Receive multiple messages at once Solace C API
Hi
I was trying some variations on sending and receiving direct messages, publish-subscribe.
I came across a sendMultipleMsgs function which basically sends an array of messages at once. That works great for the publisher. For the subscriber, it takes the same amount of time to receive. Is there any way the subscriber can also receive multiple messages at once from the event broker?
Answers
-
Hi @chaudharys, not really. The problem is that when sending, the publisher knows it has multiple messages to send. You don't have that same luxury at the receiver.
Now, you might think that you could add an indication at the publisher to say "this is part of a multiple message stream so should be received sequentially." Nice idea - but it's not that simple. Suppose some other publisher sends a message to the same topic at the same time?So, I suppose the question is when you say "it takes some time," what's most important to you - message throughput or send-receive latency?
0