🎄 Happy Holidays! 🥳
Most of Solace is closed December 24–January 1 so our employees can spend time with their families. We will re-open Thursday, January 2, 2024. Please expect slower response times during this period and open a support ticket for anything needing immediate assistance.
Happy Holidays!
Please note: most of Solace is closed December 25–January 2, and will re-open Tuesday, January 3, 2023.
what is the URL pattern to send a message to Advance Event Mesh through Rest API ?
Event Mesh URL:
POST https://domain/api/v1/queues/myQueue/messages
I tried below pattern but did not work.
POST https://<your-event-mesh-domain>/api/v1/queues/<queue-name>/messages
Best Answer
-
Hi @rajeshy1987113,
I just tested using your URL setup + body and it worked for me so that should all be good. I would suggest checking a few things:
- Queue names are case sensitive —> make sure they are exactly the same
- Make sure your authentication is correct. I used basic auth with a username/password that I got from the "Connect" menu of my service under "REST".
- Ensure your Queue has "Incoming" turned on
- Ensure your client-username has permissions to "send guaranteed messages" on it's Client Profile.
If that doesn't work can you share what response you are getting?
***Something to consider depending on your user case: while there are use cases when it makes sense to publish directly to a queue, we do generally recommend publishing messages to topics and then have 1 to many queues subscribe to those topics. This allows your publishers and consumers to be more decoupled and more easily take advantage of the publish-subscribe pattern.
0
Answers
-
Hi @rajeshy1987113,
You're close! The URL structure should look like this
https://{host}:{port}/QUEUE/{queue-name}
and then your body will go into the payload of the message.Hope that helps!
0 -
thanks for responding.
I tried same but did not work. any pre-request before sending from postman ?
I have created a queue in my Cluster Manager→ServiceDetails → Manage →Queue —> Queue Name:Sender_Recevier_SBGTest_TestProject.
I have given credentials which are available under Connect Tab—> REST API.
0 -
Hi @rajeshy1987113,
I just tested using your URL setup + body and it worked for me so that should all be good. I would suggest checking a few things:
- Queue names are case sensitive —> make sure they are exactly the same
- Make sure your authentication is correct. I used basic auth with a username/password that I got from the "Connect" menu of my service under "REST".
- Ensure your Queue has "Incoming" turned on
- Ensure your client-username has permissions to "send guaranteed messages" on it's Client Profile.
If that doesn't work can you share what response you are getting?
***Something to consider depending on your user case: while there are use cases when it makes sense to publish directly to a queue, we do generally recommend publishing messages to topics and then have 1 to many queues subscribe to those topics. This allows your publishers and consumers to be more decoupled and more easily take advantage of the publish-subscribe pattern.
0 -
Thanks Marc. Issue resolved , Issue was with permissions on it's Client Profile.
1 -
Excellent, glad to hear it @rajeshy1987113!
1