Regarding getting messageID via solClient_msg_getApplicationMessageId
Hi,
Is it possible to get the ApplicationMessageId when publishing the message via fun call solClient_msg_getApplicationMessageId?
When publishing i'm trying to get messageId just after fn call solclient_msg_alloc() but i get NULL MessageID.
Any pointers how to use it?
Regards
Amol
Comments
-
Hi @amol_p81, I'm not sure what you're trying to do here. The idea of ApplicationMessageId is that it's for use by your application - so you'd set it as a publisher and the subscriber would query it.
For the publisher:
solclient_msg_alloc();
solClient_msg_setDeliveryMode()
solClient_msg_setBinaryAttachment() // For example
solClient_msg_setApplicationMessageId()It will definitely not be set just after you allocate the buffer as the buffer will be unassigned.
Are you trying to get the messageId? If so, I'd very much recommend against it. This is an internal API message ID not intended for use by users - it is reset during failover, for instance. The recommendation in this scenario is for you to assign the messageID/sequence number etc yourself, using.... setApplicationMessageId().
0