Latest News          Visit cherrywork.com



Company

About Us
Team
Careers
Customer
Customers
Partners
Partners
Partners

Inchara - CSR

Partners

Contact Us

Latest News

Cherrywork Digital Applications

Pre-packaged, ready to deploy applications

Overview

Intelligent Task Management
Deliver Intelligent Notifications, Tasks and Process
Insights in Real-time

In-Store Perishables Management
Enable grocery retailers to prepare for
peak hour sales

Accounts Payable Automation
Automate Tasks for Better Visibility and Control
over Financial Data

Proof of Delivery
Organize, Manage and Track Shipment Detail
in Real-time

Supplier Collaboration Portal
Gain Control over Supplier Data and
Collaboration across the Processes

Mobility for Warehouse
Ensuring data accuracy for inventory and
boost warehouse operation efficiency.

Collaborative Order Management
Simplify, Streamline and Integrate Orders to
Grow Revenues

Intelligent Price Management
Manage Pricing and Respond to Marketplace
Changes Quickly

HXM Modernization Suite
Deliver More Intuitive, Engaging Experiences that
Boost Productivity

Permit to Work
Automate work permit approval processes
and ensures safe operation.

Resource Management
Plan your Resources and Project Schedule
Effectively

Advanced Metering Analytics
Transform SMART Meter Data into Actionable
Intelligence

Predictive Asset Maintenance
Balance Risk and Maximize Value Across the
Asset Lifecycle

Pipeline Corrosion and Leak Detection
Identify pipelines susceptible to leaks & corrosion
and manage the complete pipeline lifecycle.

Digital Solutions

Overview

Robotic Process Automation

SAP BTP Starter Pack
Enable Digital Transformation to Strengthen Operations with SAP BTP Services

Robotic Process Automation

Application & Process Integration
Connect People, Processes, and Applications to
Build an Intelligent Enterprise

Robotic Process Automation

Mobility
Leverage Enterprise Mobile Applications for
Agility, Scalability, and Availability

User Experience
Visualize Business Operations with
User-Friendly and Intuitive Designs

Data Management and Analytics
Utilize Actionable Insights with Advanced Data Analytics

Robotic Process Automation
Digitize Time-consuming Tasks and Processes
with Intelligent Automation

Robotic Process Automation

Hyperautomation
Discover Next-level Business Automation with
Our Hyperautomation Solutions

Robotic Process Automation

Design Mantrai
Transform Your Organization with Design-led
Innovation and Technology

Robotic Process Automation

Cloud Migration
Enhance Your Business Capabilities with
Cloud Migration Services

Industries

Consumer Products & Retail
Drive Intelligent Value with Digital

Manufacturing
Digitize E2E Value Chain

Oil and Gas
Extend Beyond the Barrel with Digital

Life Sciences
Improve Patient Outcomes and Safety

Resources
Events
Blogs

Case Studies

Press Room
SAP Innovation Pitch Decks

Cherrywork.com

Guide: Step By Step Procedure To Send And Receive Messages in a SAP Event Mesh Instance | SAP Blogs

WRITTEN BY

Ramya P
PUBLISHED​
26th May 2022
INTEGRATION
SHARE
Hello everyone! In the recent past, I have been exploring so many SAP BTP capabilities as part of my work and out of interest. This is my first blog post on the enterprise-messaging capability of SAP. This service allows components to communicate through asynchronous events and distributes business events from SAP and non-SAP sources across hybrid landscapes.

Introduction

SAP Event Mesh is a dynamic service that helps applications, services, and systems interact with each other through messages and events.

Solving the issue of scalability, SAP Event Mesh enables the reliable exchange of messages between sender and receivers.

The message broker works like a charm! We have the sender application, a message broker, and a receiver application, which could be one or many. Asynchronous communication takes place between the application, services, or systems wherein the sender application isn’t bogged down by waiting for a response from the receiver and the Reciever(s) can subscribe to critical business needs and can consume the messages on their own pace.

In this blog post, I would be detailing the step-by-step procedure to send messages to the queue and consume them as well using the REST API tool POSTMAN.

Please note that a detailed tutorial already exists, and this blog post is an improvisation of that.

Pre-Requisite:

Event Mesh Instance- Detailed steps are provided here

Procedure to Send Messages to the Queue

STEP -1 : Setting up POSTMAN
  • Open the POSTMAN application or on a browser, and create a new request.
SAP event mesh Instance
STEP -2 : Authorization Configurations

Click on the Authorization tab in Postman and click on the drop-down menu from Type and choose OAuth 2.0.

SAP event mesh Instance
Provide a user-friendly Token Name and choose the Grant Type as Client Credentials and get the Access Token URL from the Event Mesh Instance Service Key.
Coding
STEP- 3: Header Configuration

In the header of your postman add x-qos in the key and a value of either 0 or 1 in the VALUE section

QOS means Quality of Service.

It denotes the way the messaging protocol handles retransmission of the message and ensures its delivery regardless of network reliability.

If the QoS is 0, the service tries to deliver the message and returns an HTTP response with code 204 irrespective of whether the message is delivered, also the message is deleted from the queue without an acknowledgment from the client.

If the QoS is 1 delivery of the message is guaranteed, and the service responds with the HTTP response code 204. If the 204 response code isn’t received, it’s the client’s responsibility to retry until the response code 204 is received.  The message is deleted from the queue only after the acknowledgment is consumed

STEP- 4: URL Configuration

Build the postman URL as shown below:

https://<uri of the rest protocol based section from Service Keys>/messagingrest/v1/queues/<Queue name>/messages. It is the uri at the end of the document.

So your final link should look like this:

https://enterprise-messaging-pubsub.cfapps.us10.hana.ondemand.com/messagingrest/v1/queues/test/messages

Here ‘test’ is the queue name.
STEP- 5 : Sending Message

Type a message and click on send if the status is 204 No Content, which means, the message has been sent successfully.

You can check the same in the event mesh instance page you previously created.

enterprise messaging pubsub
Sending a message to event mesh using POSTMAN
STEP- 6 : Verifying in the SAP Event Mesh- Messaging Administration
Test
Queue gets updated

Procedure to Send Messages to the Queue

The first two steps remain the same.

For consuming the messages we previously sent, all we have to do is change the URL.

Build the postman URL as shown below:

https://< uri of the rest protocol based section from ServiceKeys>/messagingrest/v1/queues//messages/consumption

The final link should look like this:
https://enterprise-messaging-pubsub.cfapps.us10.hana.ondemand.com/messagingrest/v1/queues/test/messages/consumption
Here ‘test’ is the queue name.

On hitting the send button you should be able to see the messages you previously sent and the status code being 200 OK.

Post
Conclusion

This blog post provides a detailed step-by-step procedure for you to update a queue in the event mesh using the REST API tool POSTMAN and also the procedure to consume those messages.

In the upcoming blog post, I will be writing about using the AMQP adapter to send messages to a topic and consume the message from queues via email and an open connector.

Further Reading
Related Stories