cancel
Showing results for 
Search instead for 
Did you mean: 

Can we send messages to queues using the dev plan of Event Mesh

0 Kudos

Tutorials: https://developers.sap.com/tutorials/cp-enterprisemessaging-test-queue-sendreceive.html
--------------------------

Hi,

I created a service instance with the JSON provided for the dev plan. I also got the required credentials after creating the service keys.

{ "emname": "<your-emname>", "options": { "management": true, "messagingrest": true } }

I was able to create a queue from POSTMAN.

When I tried publishing a message with just the queue name(no namespace) , I received a 403 forbidden error.

Can we publish messages to queues without prefixing the namespace? . As no such namespace was provided in the service instance creation.

Accepted Solutions (1)

Accepted Solutions (1)

Tobias_Griebe
Advisor
Advisor
0 Kudos

Hi shruti_maity,

it should also be possible with the DEV plan to send a message directly to a queue.
What is the name of your queue in the EM admin UI and what was the URL that you used in Postman to send a message?

As you have created the queue from POSTMAN, this should not be an authorization issue as long as you use the same auth-token for the POST call.

Best regards,
Tobias

0 Kudos

Hi Tobias,

The queue name that I used to create a queue is queue1. But I do not see any queue details in the Event Mesh UI

The URL used --https://<uri>/messagingrest/v1/queues/queue1/messages with two headers : authorization and x-qos

Best Regards,

Shruti

Tobias_Griebe
Advisor
Advisor
0 Kudos

Hi Shruti,

I just verified in the trial landscape and I was able to publish an event directly to a queue:
https://enterprise-messaging-pubsub.cfapps.eu10.hana.ondemand.com/messagingrest/v1/queues/queue1/mes...

Are you sure your access token is still valid?

Best regards,
Tobias

0 Kudos

Hi Tobias ,

Yes my access-token is valid , because when I try the API call to get the queues , I get the below response.

{ "name": "queue1", "messageCount": 0, "queueSizeInBytes": 0, "unacknowledgedMessageCount": 0, "maxQueueSizeInBytes": 0, "maxQueueMessageCount": 0, "respectTtl": null, "deadMsgQueue": null, "ingressDisabled": false, "egressDisabled": false } ]

Is there some step that I am missing out? I tried creating a service instance , service keys and subscribed to Event Mesh standard plan with the asked roles.

Tobias_Griebe
Advisor
Advisor
0 Kudos

Hi Shruti,

You don't need the EM admin UI and the roles assigned to your user in order to work with the REST APIs.
Also for the DEV plan you don't need to subscribe to the STANDARD plan. The Admin UI for the DEV plan is accessed via the "View Dashboard" link that you can access from the service instance. That is most likely the reason why you don't see the queue in the UI...

So you are still getting a 403 Forbidden error?

Best regards,
Tobias

0 Kudos

Hi Tobias,

I usually took the standard documentation as reference and hence the confusion.

Thanks a lot for the update ,I can view the queue in the dashboard now.

But still getting the below error for pushing a message.

Tobias_Griebe
Advisor
Advisor

As you haven't posted the full URL you are trying to send the event to... are you sure you are using the correct host?
There is a different hosts for the management (enterprise-messaging-hub-backend.cfapps.eu10.hana.ondemand.com) and the messaging (enterprise-messaging-pubsub.cfapps.eu10.hana.ondemand.com) endpoints.

0 Kudos

Hi Tobias,

I checked again , the messages are getting published now.

Thanks a lot for your prompt response.

Regards,

Shruti

Answers (0)