Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestion on publishing arrays #16

Open
hei-jung opened this issue Nov 5, 2020 · 0 comments
Open

Suggestion on publishing arrays #16

hei-jung opened this issue Nov 5, 2020 · 0 comments

Comments

@hei-jung
Copy link

hei-jung commented Nov 5, 2020

Hi,
I am trying to publish an array of doubles by converting it to const char array using memcpy.
The problem is that if I set the array size bigger and bigger, the subscriber will get wrong data: about first 100 values are sent correctly, but from the next becomes garbage data.
After struggling, I came to a conclusion that there is a problem setting a message buffer when I'm trying to publish data too large.
So I suggest, could you add ability to publish message with the message length something like this:

void publish(const char* subject, const char* msg, int msg_length);

I appreciate your work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant