<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: March Developer Challenge - CloudEvents: Week 3 in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/march-developer-challenge-cloudevents-week-3/m-p/13644854#M2027265</link>
    <description>&lt;P&gt;Good one... you can indeed post a message with any REST client but I do have to warn you that some code will be needed for the challenge next week &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 20 Mar 2024 20:57:00 GMT</pubDate>
    <dc:creator>ajmaradiaga</dc:creator>
    <dc:date>2024-03-20T20:57:00Z</dc:date>
    <item>
      <title>March Developer Challenge - CloudEvents: Week 3</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/march-developer-challenge-cloudevents-week-3/m-p/13642145#M2027219</link>
      <description>&lt;P class=""&gt;Last week we learnt how to create CloudEvents programmatically by using one of the many SDKs available. This week we will extend the CloudEvent created last week and we will send it to SAP Integration Suite, advanced event mesh.&lt;/P&gt;&lt;P class=""&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Week 3 dev challenge data flow" style="width: 979px;"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/82008i65FA0E5BF3662DF0/image-size/large?v=v2&amp;amp;px=999" role="button" title="wk3-data-flow.png" alt="Week 3 dev challenge data flow" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Week 3 dev challenge data flow&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P class=""&gt;Before we get to the challenge, we might need to talk a bit about what an Event-Driven architecture is and why it is so important. Let's get started.&lt;/P&gt;&lt;BLOCKQUOTE dir="auto"&gt;&lt;P&gt;Links to March's developer challenge:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Week 1: &lt;A href="https://community.sap.com/t5/application-development-discussions/march-developer-challenge-cloudevents-week-1/td-p/13629129" target="_blank" rel="noopener"&gt;https://community.sap.com/t5/application-development-discussions/march-developer-challenge-cloudeven...&lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;Week 2: &lt;A href="https://community.sap.com/t5/application-development-discussions/march-developer-challenge-cloudevents-week-2/m-p/13635719" target="_blank" rel="noopener"&gt;https://community.sap.com/t5/application-development-discussions/march-developer-challenge-cloudeven...&lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;Week 3: &lt;A href="https://community.sap.com/t5/application-development-discussions/march-developer-challenge-cloudevents-week-2/m-p/13635719" target="_blank" rel="noopener"&gt;https://community.sap.com/t5/application-development-discussions/march-developer-challenge-cloudevents-week-3/td-p/13642145&lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;Week 4: &lt;A href="https://community.sap.com/t5/application-development-discussions/march-developer-challenge-cloudevents-week-4/td-p/13648232" target="_blank" rel="noopener"&gt;https://community.sap.com/t5/application-development-discussions/march-developer-challenge-cloudevents-week-4/td-p/13648232&lt;/A&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/BLOCKQUOTE&gt;&lt;H2&gt;Event-Driven Architectures&lt;/H2&gt;&lt;P class=""&gt;Long gone are the days when a system (aka&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;&lt;STRONG&gt;target system&lt;/STRONG&gt;&lt;/EM&gt;) will constantly poll to check if there are any changes in another system, e.g. a new customer created in a master data system. Traditionally, the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;&lt;STRONG&gt;target system&lt;/STRONG&gt;&lt;/EM&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;will only know this by programming a routine that will poll a service exposed in the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;&lt;STRONG&gt;source system&lt;/STRONG&gt;&lt;/EM&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;every X minutes/hours/days. The expectation nowadays is that systems are integrated and that the data exchanged between these systems will be immediately available in the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;&lt;STRONG&gt;target system(s)&lt;/STRONG&gt;&lt;/EM&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;if any data is created/changed in the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;&lt;STRONG&gt;source system&lt;/STRONG&gt;&lt;/EM&gt;. Enter Event-Driven architectures.&lt;/P&gt;&lt;P class="" data-unlink="true"&gt;An Event-Driven Architecture is a software architecture paradigm concerning the production and consumption of events. An event can be defined as a significant change in the state of an object within a system[1]. For example, when a customer/supplier/employee (&lt;EM&gt;&lt;STRONG&gt;business object&lt;/STRONG&gt;&lt;/EM&gt;) is created/updated/deleted (&lt;EM&gt;&lt;STRONG&gt;action&lt;/STRONG&gt;&lt;/EM&gt;) in a system. Translating this to the SAP world, when a Business Partner is created/changed in SAP S/4HANA (&lt;EM&gt;&lt;STRONG&gt;source system&lt;/STRONG&gt;&lt;/EM&gt;), SAP S/4HANA can notify that there was a change in a business object and&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;&lt;STRONG&gt;target system(s)&lt;/STRONG&gt;&lt;/EM&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;interested in the Business Partner object can then react (do something about it) if they need to. This could be create/update/delete the object in their systems.&lt;/P&gt;&lt;H3&gt;How do source and target systems communicate?&lt;/H3&gt;&lt;P class=""&gt;Now, if the source system lets other systems know of any changes happening in its business objects, it will not be sustainable to create a new programming routine within the source system every time we want to notify a new target system of any changes. Traditionally we would have some form of middleware, e.g. SAP Cloud Integration, and configure our source system, an SAP S/4HANA system, to send notifications of these events to the middleware and then use the middleware to distribute these messages, e.g. we would add target system(s) as needed. Now, we are moving the problem from the source system to a sort of middleware but ideally, there will be a way for the source system to notify others without the need to make any changes. Enter the event broker.&lt;/P&gt;&lt;P class="" data-unlink="true"&gt;&lt;EM&gt;An event broker is message-oriented middleware that enables the transmission of events between different components of a system, acting as a mediator between publishers and subscribers. It is the cornerstone of event-driven architecture, and all event-driven applications use some form of event broker to send and receive information&lt;/EM&gt;[2].&lt;/P&gt;&lt;P class=""&gt;By introducing an event broker in our landscapes, we can configure our source systems to&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;publish&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;their events to this message-oriented middleware. The source system will specify the class of the message (aka&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;topic&lt;/STRONG&gt;). Then, systems interested in the changes happening, in a particular business object, in the source system can&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;subscribe&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;to the event(s), via the event broker, by specifying the topic they are interested in. There are two keywords important here, publish and subscribe (PubSub), this is a well-known messaging pattern used to decouple systems/applications and allow communication between them.&lt;/P&gt;&lt;H3&gt;What is the PubSub messaging pattern?&lt;/H3&gt;&lt;P class="" data-unlink="true"&gt;&lt;EM&gt;Publish-subscribe is a communication pattern that is defined by the decoupling of applications, where applications publish messages to an intermediary broker rather than communicating directly with consumers (as in point-to-point)&lt;/EM&gt;[3]. In a way, publishers and consumers do not need to know each other; they simply publish (produce) or consume (receive) the events. When following this messaging pattern we move from, the traditional polling mechanism to know if there have been any changes in the source system, to reacting to real-time events (notifications) the moment something happens in the source system.&lt;/P&gt;&lt;P class=""&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="CloudEvents-PubSub.drawio.png" style="width: 999px;"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/71583i0F3F672E1A5281D9/image-size/large?v=v2&amp;amp;px=999" role="button" title="CloudEvents-PubSub.drawio.png" alt="CloudEvents-PubSub.drawio.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;We mentioned before how target systems can subscribe to events by specifying a topic they are interested in.... some event brokers will allow subscribers to subscribe to topics by using wildcards (*) and they will be able to receive messages for different topics. For example, let's assume we have an SAP S/4HANA with the name&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;S4D&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;and it publishes the Business Partner create and change on the following topics:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;FONT face="courier new,courier"&gt;sap/S4HANAOD/S4D/ce/sap/s4/beh/businesspartner/v1/BusinessPartner/Created/v1&lt;/FONT&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;and&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;FONT face="courier new,courier"&gt;sap/S4HANAOD/S4D/ce/sap/s4/beh/businesspartner/v1/BusinessPartner/Changed/v1&lt;/FONT&gt;. A subscriber system could subscribe to both topics using a wildcard, e.g.&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;s&lt;FONT face="courier new,courier"&gt;ap/S4HANAOD/S4D/ce/sap/s4/beh/businesspartner/v1/BusinessPartner/*/v1&lt;/FONT&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;and receive the message for both event types.&lt;/P&gt;&lt;P class=""&gt;With many systems in our landscapes and each one being developed by different vendors/teams, it would be good if there was a standard way of structuring these events to simplify how systems create/handle/process these messages right? This is why we first learnt about&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://cloudevents.io/" target="_blank" rel="noopener"&gt;CloudEvents&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;span class="lia-unicode-emoji" title=":grinning_face_with_big_eyes:"&gt;😃&lt;/span&gt;.&lt;/P&gt;&lt;P class=""&gt;Now, we can use the CloudEvents message format to exchange messages between systems/services/applications. In our case, we will publish a CloudEvent to a topic in one of SAP's event-driven portfolio products: SAP Integration Suite, advanced event mesh.&lt;/P&gt;&lt;H2&gt;SAP Integration Suite, advanced event mesh&lt;/H2&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="CloudEvents-EDA.drawio.png" style="width: 902px;"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/74742i2E96FEAFCAAA64BA/image-size/large?v=v2&amp;amp;px=999" role="button" title="CloudEvents-EDA.drawio.png" alt="CloudEvents-EDA.drawio.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;SAP offers various services that can help customers embrace event-driven architectures. The different offerings can meet customers where they are in their EDA adoption/implementation journey. These are:&lt;/P&gt;&lt;UL class=""&gt;&lt;LI&gt;SAP Event Broker for SAP cloud applications&lt;/LI&gt;&lt;LI&gt;SAP Event Mesh&lt;/LI&gt;&lt;LI&gt;SAP Integration Suite, advanced event mesh&lt;/LI&gt;&lt;/UL&gt;&lt;P class=""&gt;Now, for this week's challenge we will focus on communicating SAP Integration Suite, advanced event mesh (AEM), which is a complete event streaming, event management, and monitoring platform that incorporates best practices, expertise, and technology for event-driven architecture (EDA) on a single platform. With AEM you can deploy event broker services, create event meshes, and optimize and monitor your event-driven system.&lt;/P&gt;&lt;BLOCKQUOTE dir="auto"&gt;&lt;P class=""&gt;&lt;span class="lia-unicode-emoji" title=":loudspeaker:"&gt;📢&lt;/span&gt;To learn more about SAP's event-driven portfolio check out this blog post: CloudEvents at SAP &lt;span class="lia-unicode-emoji" title=":foggy:"&gt;🌁&lt;/span&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://community.sap.com/t5/application-development-blog-posts/cloudevents-at-sap/ba-p/13620137" target="_blank" rel="noopener"&gt;https://community.sap.com/t5/application-development-blog-posts/cloudevents-at-sap/ba-p/13620137&lt;/A&gt;.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;H2&gt;Connecting with SAP Integration Suite, advanced event mesh (AEM)&lt;/H2&gt;&lt;P class="" data-unlink="true"&gt;We can use different protocols to connect with AEM, this will depend on our needs and the type of service/device that will be publishing/consuming messages. The event broker provides a foundation for multi-protocol and standards eventing including Solace Message Format (SMF), JMS1.1, MQTT3.11, REST, and AMQP1.0[1].&lt;/P&gt;&lt;P class=""&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Protocols supported" style="width: 999px;"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/81909i1127F88E1E460F77/image-size/large?v=v2&amp;amp;px=999" role="button" title="wk3-protocols.png" alt="Protocols supported" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Protocols supported&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;BR /&gt;Also, there are many connectivity options available depending on your favourite programming language.&lt;/P&gt;&lt;BLOCKQUOTE dir="auto"&gt;&lt;P class=""&gt;Check out the tutorials available for the different programming languages -&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://tutorials.solace.dev/" target="_blank" rel="noopener"&gt;https://tutorials.solace.dev/&lt;/A&gt;.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="wk3-languages.png" style="width: 999px;"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/81910i20BD52E29182A6B2/image-size/large?v=v2&amp;amp;px=999" role="button" title="wk3-languages.png" alt="wk3-languages.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P class="" data-unlink="true"&gt;&lt;STRONG&gt;To keep things simple for this developer challenge, we are going to use the REST Messaging Protocol[3] to send messages (publish) to the event broker by using HTTP POST requests.&lt;/STRONG&gt; This uses standard HTTP, which we are all familiar with, meaning that you can send messages with any REST client, e.g.&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://www.usebruno.com/" target="_blank" rel="noopener"&gt;Bruno&lt;/A&gt;.&lt;/P&gt;&lt;P class=""&gt;In our case, we are interested in producing messages so we will act as a REST producer and send messages to a topic in the event broker. A REST message sent from a publisher to an event broker consists of a POST request, HTTP headers, and an HTTP message body. The event broker uses the POST request to determine where to route the message, and the HTTP headers specify message properties that may determine how the message is handled. The body of the POST request is included as the message payload.&lt;/P&gt;&lt;P class=""&gt;When an event broker successfully receives a REST message, it sends back an acknowledgement (“ack”) in the form of a POST response. An ack consists of a response code (typically 200 OK) and HTTP headers. Because the response code is sufficient to acknowledge receipt of the original message, the returned message has an empty message body.&lt;/P&gt;&lt;BLOCKQUOTE dir="auto"&gt;&lt;P class=""&gt;We can also use the REST Messaging APIs to consume messages but this requires some additional configuration in the event broker, e.g. setting up a&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://docs.solace.com/Services/Managing-RDPs.htm" target="_blank" rel="noopener"&gt;REST Delivery Point&lt;/A&gt;, aka Webhook.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P class="" data-unlink="true"&gt;We can send messages to a topic or a queue. Below are some examples of how we can send a message to a topic or a queue[2]:&lt;/P&gt;&lt;UL class=""&gt;&lt;LI&gt;&lt;P class=""&gt;Sending a message to a topic "a" (both commands are equivalent):&lt;/P&gt;&lt;PRE&gt;curl -X POST -d &lt;SPAN class=""&gt;"Hello World Topic"&lt;/SPAN&gt; http://&amp;lt;host:port&amp;gt;/a --header &lt;SPAN class=""&gt;"Content-Type: text/plain"&lt;/SPAN&gt;
curl -X POST -d &lt;SPAN class=""&gt;"Hello World Topic"&lt;/SPAN&gt; http://&amp;lt;host:port&amp;gt;/TOPIC/a --header &lt;SPAN class=""&gt;"Content-Type: text/plain"&lt;/SPAN&gt;
&lt;/PRE&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P class=""&gt;Sending a message to a queue "Q/test":&lt;/P&gt;&lt;PRE&gt;curl -X POST -d &lt;SPAN class=""&gt;"Hello World Queue"&lt;/SPAN&gt; http://&amp;lt;host:port&amp;gt;/QUEUE/Q/test --header &lt;SPAN class=""&gt;"Content-Type: text/plain"&lt;/SPAN&gt;
&lt;/PRE&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;BLOCKQUOTE dir="auto"&gt;&lt;P class=""&gt;You'll notice that in the examples above we are sending as the body of our message plain text. When sending a CloudEvent the Content-Type would be 'application/cloudevents+json'&lt;/P&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;span class="lia-unicode-emoji" title=":magnifying_glass_tilted_left:"&gt;🔍&lt;/span&gt;Interested in knowing what Sending a CloudEvent to a topic looks like using&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;I&gt;curl&lt;/I&gt;?&lt;P class=""&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="wk3-curl-cloudevent-sample.png" style="width: 999px;"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/81912iB63ACDDEF2044344/image-size/large?v=v2&amp;amp;px=999" role="button" title="wk3-curl-cloudevent-sample.png" alt="wk3-curl-cloudevent-sample.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P class=""&gt;As part of this week's challenge we will POST our CloudEvent to a topic. In our case, the topic will be&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;FONT face="courier new,courier"&gt;/dev-challenge/week-3/{{sapcommunityid}}/ce&lt;/FONT&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;and this is how we include it in the POST request URL:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;FONT face="courier new,courier"&gt;&lt;A href="https://{{host}}:{{port}}/TOPIC/dev-challenge/week-3/{{sapcommunityid}}/ce" target="_blank" rel="noopener"&gt;https://{{host}}:{{port}}/TOPIC/dev-challenge/week-3/{{sapcommunityid}}/ce&lt;/A&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;H2&gt;Week 3 challenge - Send CloudEvent to SAP Integration Suite, advanced event mesh&lt;/H2&gt;&lt;P class=""&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Week 3 dev challenge data flow" style="width: 979px;"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/82008i65FA0E5BF3662DF0/image-size/large?v=v2&amp;amp;px=999" role="button" title="wk3-data-flow.png" alt="Week 3 dev challenge data flow" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Week 3 dev challenge data flow&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;span class="lia-unicode-emoji" title=":backhand_index_pointing_right:"&gt;👉&lt;/span&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Your task for this week is:&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;Extend the CloudEvent you created for last week's challenge and add an&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://github.com/cloudevents/spec/blob/v1.0/spec.md#extension-context-attributes" target="_blank" rel="noopener"&gt;extension context attribute&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;(&lt;FONT face="courier new,courier"&gt;sapcommunityid&lt;/FONT&gt;). You will need to specify your &lt;FONT face="courier new,courier"&gt;sapcommunityid&lt;/FONT&gt;, e.g. &lt;EM&gt;ajmaradiaga&lt;/EM&gt; in my case, as a value here.&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Please ensure that you specify the &lt;FONT face="courier new,courier"&gt;sapcommunityid&lt;/FONT&gt; in the message, if not it will not count as valid. &lt;/STRONG&gt;&lt;EM&gt;Note: The diagram above captures the data flow of this week's challenge.&lt;/EM&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P class=""&gt;Once you've extended the original message, send the message to SAP Integration Suite, advanced event mesh - by publishing the message in the topic&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;FONT face="courier new,courier"&gt;dev-challenge/week-3/[my-sap-community-id]/ce. &lt;FONT face="arial,helvetica,sans-serif"&gt;In the comments,&lt;/FONT&gt;&lt;/FONT&gt;&lt;SPAN&gt; &lt;STRONG&gt;&lt;EM&gt;&lt;FONT color="#FF6600"&gt;share a snippet of your code where the connectivity is taking place &lt;/FONT&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM&gt;&lt;FONT color="#FF6600"&gt;and post a screenshot of the successful run of your code&lt;/FONT&gt;&lt;/EM&gt;&lt;/STRONG&gt;. Use the credentials below to connect to AEM. &lt;EM&gt;Note: You can check that your message was received and consumed on this website:&amp;nbsp;&lt;A href="https://ce-dev-challenge-wk3.cfapps.eu10.hana.ondemand.com/consumed-messages/webapp/index.html" target="_blank" rel="noopener"&gt;https://ce-dev-challenge-wk3.cfapps.eu10.hana.ondemand.com/consumed-messages/webapp/index.html&lt;/A&gt;.&lt;/EM&gt;&lt;/P&gt;&lt;BLOCKQUOTE dir="auto"&gt;&lt;P class=""&gt;For example, in my case I will publish the message to the topic&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;FONT face="courier new,courier"&gt;dev-challenge/week-3/ajmaradiaga/ce&lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;H4&gt;Bonus:&lt;/H4&gt;&lt;P&gt;You can also try sending the CloudEvent message using a protocol different than REST, e.g. AMQP, SMF. There is no need to reinvent the wheel here... check out the code available in the &lt;A href="https://github.com/SolaceSamples" target="_self"&gt;Solace Samples org&lt;/A&gt;, e.g. for &lt;A href="https://github.com/SolaceSamples/solace-samples-nodejs/tree/master/src/features" target="_self"&gt;Node.js&lt;/A&gt;, &lt;A href="https://github.com/SolaceSamples/solace-samples-nodejs/tree/master/src/features" target="_self"&gt;Python&lt;/A&gt; and the tutorials available for the different &lt;A href="https://tutorials.solace.dev/" target="_self"&gt;programming languages&lt;/A&gt;. There are plenty of examples there that show you how to use the different protocols.&lt;/P&gt;&lt;HR /&gt;&lt;H3&gt;&lt;span class="lia-unicode-emoji" title=":police_car_light:"&gt;🚨&lt;/span&gt;Credentials &lt;span class="lia-unicode-emoji" title=":police_car_light:"&gt;🚨&lt;/span&gt;&lt;/H3&gt;&lt;P class=""&gt;To communicate with AEM, you will need to authenticate when posting a message. In the section below you can find the credentials required to connect.&lt;/P&gt;&lt;BLOCKQUOTE dir="auto"&gt;&lt;P class=""&gt;For the adventurous out there.... I'm also sharing the connection details for different protocols that we can use to communicate with AEM, e.g. AMQP, Solace Messaging, Solace Web Messaging. In case you want to play around and get familiar with different protocols.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":locked_with_key:"&gt;🔐&lt;/span&gt;Expand to view credential details &lt;span class="lia-unicode-emoji" title=":unlocked:"&gt;🔓&lt;/span&gt;&lt;/P&gt;&lt;LI-SPOILER&gt;&lt;UL&gt;&lt;LI&gt;Connection Type:&lt;BR /&gt;REST: &lt;FONT face="courier new,courier"&gt;&lt;A href="https://mr-connection-plh11u5eu6a.messaging.solace.cloud:9443" target="_blank" rel="noopener"&gt;https://mr-connection-plh11u5eu6a.messaging.solace.cloud:9443&lt;/A&gt;&lt;/FONT&gt;&lt;BR /&gt;AMQP: &lt;FONT face="courier new,courier"&gt;amqps://mr-connection-plh11u5eu6a.messaging.solace.cloud:5671&lt;/FONT&gt;&lt;BR /&gt;Solace Messaging: &lt;FONT face="courier new,courier"&gt;tcps://mr-connection-plh11u5eu6a.messaging.solace.cloud:55443&lt;/FONT&gt;&lt;BR /&gt;Solace Web Messaging: &lt;FONT face="courier new,courier"&gt;wss://mr-connection-plh11u5eu6a.messaging.solace.cloud:443&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;Username: &lt;FONT face="courier new,courier"&gt;solace-cloud-client&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;Password: &lt;FONT face="courier new,courier"&gt;mcrtp5mps5q12lfqed5kfndbi2&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;Message VPN: &lt;FONT face="courier new,courier"&gt;eu-fr-devbroker&lt;/FONT&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI-SPOILER&gt;&lt;HR /&gt;&lt;H3&gt;&lt;span class="lia-unicode-emoji" title=":white_heavy_check_mark:"&gt;✅&lt;/span&gt;Validation process for this week's challenge &lt;span class="lia-unicode-emoji" title=":cross_mark:"&gt;❌&lt;/span&gt;&lt;/H3&gt;&lt;P class=""&gt;As part of the validation process for this week's challenge, there is a consumer service (Monitoring service in the diagram above) that will process the messages sent. The consumer program will validate that the message you post includes an extension context attribute (&lt;FONT face="courier new,courier"&gt;sapcommunityid&lt;/FONT&gt;) and this will need to match the path specified for the topic. As for previous weeks, I will kudo a successful response and I will post every day the SAP Community IDs of the messages received and processed successfully.&lt;/P&gt;&lt;BLOCKQUOTE dir="auto"&gt;&lt;P class=""&gt;You can monitor the messages processed by the consumer service on this website:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://ce-dev-challenge-wk3.cfapps.eu10.hana.ondemand.com/consumed-messages/webapp/index.html" target="_blank" rel="noopener"&gt;https://ce-dev-challenge-wk3.cfapps.eu10.hana.ondemand.com/consumed-messages/webapp/index.html&lt;/A&gt;. If there is an error in the message sent, the monitoring app will tell you what the error is, e.g. not a valid CloudEvent,&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;FONT face="courier new,courier"&gt;sapcommunityid&lt;/FONT&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;extension context attribute missing, or&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;sapcommunityid&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;doesn't match community Id specified in topic. The consumer service is subscribed to the topics using a wildcard -&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;FONT face="courier new,courier"&gt;dev-challenge/week-3/*/ce&lt;/FONT&gt;. Meaning that it will only process messages sent to topics that fit that pattern.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P class=""&gt;Below you can see a screenshot of a message processed successfully by the &lt;A href="https://ce-dev-challenge-wk3.cfapps.eu10.hana.ondemand.com/consumed-messages/webapp/index.html" target="_self"&gt;consumer service&lt;/A&gt;.&lt;/P&gt;&lt;DIV class=""&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="wk3-screenshot-monitoring.png" style="width: 999px;"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/81911i99B87A251E91F037/image-size/large?v=v2&amp;amp;px=999" role="button" title="wk3-screenshot-monitoring.png" alt="wk3-screenshot-monitoring.png" /&gt;&lt;/span&gt;Example of a payload containing the extension context attribute &lt;FONT face="courier new,courier"&gt;sapcommunityid&lt;/FONT&gt;:&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;{
    "specversion": "1.0",
    "id": "204f70c0-1301-4812-9705-8db7ab57065e",
    "source": "https://tms-prod.ajmaradiaga.com/tickets",
    "type": "com.ajmaradiaga.tms.Ticket.Created.v1",
    "time": "2024-03-17T12:34:03.180643+00:00",
    "data": {
        "id": "IT00010232",
        "description": "Install ColdTurkey to block distracting websites.",
        "urgency": {
            "id": 1,
            "description": "High"
        }
    },
    "sapcommunityid": "ajmaradiaga"
}​&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;OL class=""&gt;&lt;LI&gt;&lt;P class="" data-unlink="true"&gt;How Apps Interact with PubSub+ Messaging Components:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://docs.solace.com/API/Component-Maps.htm" target="_blank" rel="noopener"&gt;link&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;↩︎&amp;nbsp;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P class="" data-unlink="true"&gt;Solace REST Example Code:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://docs.solace.com/API/RESTMessagingPrtl/Solace-REST-Example.htm" target="_blank" rel="noopener"&gt;link&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;↩︎&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P class="" data-unlink="true"&gt;REST Messaging Protocol:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://docs.solace.com/API/RESTMessagingPrtl/Solace-REST-Overview.htm" target="_blank" rel="noopener"&gt;link&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;↩︎&amp;nbsp;&lt;/P&gt;&lt;/LI&gt;&lt;/OL&gt;</description>
      <pubDate>Thu, 22 May 2025 06:35:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/march-developer-challenge-cloudevents-week-3/m-p/13642145#M2027219</guid>
      <dc:creator>ajmaradiaga</dc:creator>
      <dc:date>2025-05-22T06:35:28Z</dc:date>
    </item>
    <item>
      <title>Re: March Developer Challenge - CloudEvents: Week 3</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/march-developer-challenge-cloudevents-week-3/m-p/13642151#M2027220</link>
      <description>&lt;H3&gt;Sample Solution&lt;/H3&gt;&lt;P&gt;Using REST:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;print("===========\nCloud Event\n===========\n")

print(f"Headers: {headers}")

json_body = json.loads(body)

# Pretty print json
print(f"Message: {json.dumps(json_body, indent=2)}")

topic = f"dev-challenge/week-3/{SAP_COMMUNITY_ID}/ce"
print(f"\nSending message to topic: {topic}")

response = requests.post(
    f"{SOLACE_TRANSPORT_PROTOCOL}://{SOLACE_HOST}:{SOLACE_PORT}/TOPIC/{topic}", data=body, headers=headers,
    auth=HTTPBasicAuth(SOLACE_USERNAME, SOLACE_PASSWORD))

print(f"\n=============\nHTTP Response\n=============\nStatus code: {response.status_code}")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Screenshot:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Screenshot solution" style="width: 999px;"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/82662i72600E2C2818E258/image-size/large?v=v2&amp;amp;px=999" role="button" title="wk3-screenshot-solution.png" alt="Screenshot solution" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Screenshot solution&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Mar 2024 04:14:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/march-developer-challenge-cloudevents-week-3/m-p/13642151#M2027220</guid>
      <dc:creator>ajmaradiaga</dc:creator>
      <dc:date>2024-03-19T04:14:26Z</dc:date>
    </item>
    <item>
      <title>Re: March Developer Challenge - CloudEvents: Week 3</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/march-developer-challenge-cloudevents-week-3/m-p/13642152#M2027221</link>
      <description>&lt;P&gt;An alternative would be using Solace Messaging:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;# Import Solace Python  API modules
from solace.messaging.messaging_service import MessagingService, ReconnectionListener, ReconnectionAttemptListener, ServiceInterruptionListener, RetryStrategy, ServiceEvent
from solace.messaging.errors.pubsubplus_client_error import PubSubPlusClientError
from solace.messaging.publisher.direct_message_publisher import PublishFailureListener, FailedPublishEvent
from solace.messaging.resources.topic_subscription import TopicSubscription
from solace.messaging.receiver.message_receiver import MessageHandler
from solace.messaging.config.solace_properties.message_properties import APPLICATION_MESSAGE_ID
from solace.messaging.resources.topic import Topic
from solace.messaging.receiver.inbound_message import InboundMessage
from solace.messaging.config.transport_security_strategy import TLS

.....

message_builder = messaging_service.message_builder() \
                .with_property("language", "Python") \

try:
    while True:
        
        topic, json_str = random_cloud_event()
        additional_properties = {APPLICATION_MESSAGE_ID: f'sample_id 1'}
        # Creating a dynamic outbound message 
        outbound_message = message_builder.build(json_str, additional_message_properties=additional_properties)
        # Direct publish the message
        direct_publisher.publish(destination=Topic.of(topic), message=outbound_message)
        print("Sent")

        time.sleep(15)
        
except KeyboardInterrupt:
        print('\nDisconnecting Messaging Service')
finally:
    print('Terminating Publisher and Receiver')
    direct_publisher.terminate()
    print('Disconnecting Messaging Service')
    messaging_service.disconnect()&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 19 Mar 2024 04:12:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/march-developer-challenge-cloudevents-week-3/m-p/13642152#M2027221</guid>
      <dc:creator>ajmaradiaga</dc:creator>
      <dc:date>2024-03-19T04:12:51Z</dc:date>
    </item>
    <item>
      <title>Re: March Developer Challenge - CloudEvents: Week 3</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/march-developer-challenge-cloudevents-week-3/m-p/13642379#M2027223</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Here is my submission &lt;span class="lia-unicode-emoji" title=":ok_hand:"&gt;👌&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;Code JS:&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;...
async function sendCloudEvent() {
    try {
        const response = await axios({
            method: "post",
            url: `${SOLACE_TRANSPORT_PROTOCOL}://${SOLACE_HOST}:${SOLACE_PORT}/TOPIC/dev-challenge/week-3/${SAP_COMMUNITY_ID}/ce`,
            data: body,
            headers: {
                ...headers,
                Authorization: `Basic ${Buffer.from(`${SOLACE_USERNAME}:${SOLACE_PASSWORD}`).toString("base64")}`,
            },
        });

        console.log("Response Status:", response.status);
    } catch (error) {
        console.error("Error:", error);
    }
}

sendCloudEvent();&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;STRONG&gt;&amp;nbsp;Result:&lt;/STRONG&gt;&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="r00k13d3v_2-1710836080993.png" style="width: 999px;"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/82757i946A0B15A89575D2/image-size/large?v=v2&amp;amp;px=999" role="button" title="r00k13d3v_2-1710836080993.png" alt="r00k13d3v_2-1710836080993.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Mar 2024 08:17:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/march-developer-challenge-cloudevents-week-3/m-p/13642379#M2027223</guid>
      <dc:creator>r00k13d3v</dc:creator>
      <dc:date>2024-03-19T08:17:00Z</dc:date>
    </item>
    <item>
      <title>Re: March Developer Challenge - CloudEvents: Week 3</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/march-developer-challenge-cloudevents-week-3/m-p/13642399#M2027225</link>
      <description>&lt;P&gt;This example doesn't contain the sapcommunityid but I can see in the monitoring app that you've sent one containing the extension context attribute....&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ajmaradiaga_0-1710836325302.png" style="width: 999px;"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/82761iE71F9AD4F7C3D1F2/image-size/large?v=v2&amp;amp;px=999" role="button" title="ajmaradiaga_0-1710836325302.png" alt="ajmaradiaga_0-1710836325302.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Mar 2024 08:19:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/march-developer-challenge-cloudevents-week-3/m-p/13642399#M2027225</guid>
      <dc:creator>ajmaradiaga</dc:creator>
      <dc:date>2024-03-19T08:19:00Z</dc:date>
    </item>
    <item>
      <title>Re: March Developer Challenge - CloudEvents: Week 3</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/march-developer-challenge-cloudevents-week-3/m-p/13642747#M2027226</link>
      <description>&lt;P&gt;Hello , here is my response&amp;nbsp;&lt;/P&gt;&lt;P&gt;Code in node.js :&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="pamoli_banerjee_0-1710846960137.png" style="width: 999px;"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/82952i71479481DC8FC080/image-size/large?v=v2&amp;amp;px=999" role="button" title="pamoli_banerjee_0-1710846960137.png" alt="pamoli_banerjee_0-1710846960137.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Response :&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="pamoli_banerjee_1-1710847011443.png" style="width: 999px;"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/82957iB73FC4D7ACA7A289/image-size/large?v=v2&amp;amp;px=999" role="button" title="pamoli_banerjee_1-1710847011443.png" alt="pamoli_banerjee_1-1710847011443.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;And here is my valid entry in the app :&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="pamoli_banerjee_2-1710847059612.png" style="width: 999px;"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/82967iE9540493F3201AA0/image-size/large?v=v2&amp;amp;px=999" role="button" title="pamoli_banerjee_2-1710847059612.png" alt="pamoli_banerjee_2-1710847059612.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Mar 2024 11:18:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/march-developer-challenge-cloudevents-week-3/m-p/13642747#M2027226</guid>
      <dc:creator>pamoli_banerjee</dc:creator>
      <dc:date>2024-03-19T11:18:26Z</dc:date>
    </item>
    <item>
      <title>Re: March Developer Challenge - CloudEvents: Week 3</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/march-developer-challenge-cloudevents-week-3/m-p/13642934#M2027229</link>
      <description>&lt;P&gt;Here is my nodejs code:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const { CloudEvent, HTTP } = require("cloudevents");
const axios = require('axios');
const dotenv = require('dotenv');

const ce = new CloudEvent({
  "specversion": "1.0",
  "type": "com.sonal.plm.NPDI.Created.v1",
  "source": "https://plm-prod.sonal.com/npdis",
  "subject": "NPDI000000001",
  "id": "196179a2-6cf1-4166-9975-51f9afdb3a0d",
  "time": "2024-03-06 12:00:00",
  "datacontenttype": "application/json",
  "data": { 
    "id": "NPDI000000001",
    "description": "New Product Development and Introduction Created"
  },
  "sapcommunityid":"spirit2681"
})
const { headers, body } = HTTP.structured(ce);

// Load the environment variables from the .env file
dotenv.config();

const {SOLACE_TRANSPORT_PROTOCOL, SOLACE_HOST, SOLACE_PORT, SOLACE_TOPIC, SAP_COMMUNITY_ID, SOLACE_USERNAME, SOLACE_PASSWORD} = process.env;

//Output
console.log(
   "Headers:", "\n",
    JSON.stringify(headers, null, 2), "\n",
    "Body:", "\n",
    JSON.stringify(JSON.parse(body), null, 2));

const eventSender = async () =&amp;gt; {
    try {
        const response = await axios({
            method: "post",
            url: `${SOLACE_TRANSPORT_PROTOCOL}://${SOLACE_HOST}:${SOLACE_PORT}/TOPIC/${SOLACE_TOPIC}/${SAP_COMMUNITY_ID}/ce`,
            data: body,
            headers: {
                ...headers,
                Authorization: `Basic ${Buffer.from(`${SOLACE_USERNAME}:${SOLACE_PASSWORD}`).toString("base64")}`,
            },
        });
        console.log("Sending message to the topic: ", `${SOLACE_TOPIC}/${SAP_COMMUNITY_ID}`);
        console.log("Response Status:", response.status);
    } catch (error) {
        console.error("Error:", error);
    }
}

eventSender();&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Output:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="spirit2681_0-1710853208150.png" style="width: 999px;"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/83086i5CFF86C261C63CE0/image-size/large?v=v2&amp;amp;px=999" role="button" title="spirit2681_0-1710853208150.png" alt="spirit2681_0-1710853208150.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;And here is the valid entry in the app:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="spirit2681_1-1710853293946.png" style="width: 999px;"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/83087i5A80D751529AD617/image-size/large?v=v2&amp;amp;px=999" role="button" title="spirit2681_1-1710853293946.png" alt="spirit2681_1-1710853293946.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Mar 2024 13:02:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/march-developer-challenge-cloudevents-week-3/m-p/13642934#M2027229</guid>
      <dc:creator>spirit2681</dc:creator>
      <dc:date>2024-03-19T13:02:27Z</dc:date>
    </item>
    <item>
      <title>Re: March Developer Challenge - CloudEvents: Week 3</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/march-developer-challenge-cloudevents-week-3/m-p/13643254#M2027236</link>
      <description>&lt;P&gt;Code with REST call:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Dan_Wroblewski_0-1710858942564.png" style="width: 689px;"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/83285i7DB9DB83B44ACDCF/image-dimensions/689x615?v=v2" width="689" height="615" role="button" title="Dan_Wroblewski_0-1710858942564.png" alt="Dan_Wroblewski_0-1710858942564.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Code running:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Dan_Wroblewski_1-1710859063465.png" style="width: 689px;"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/83287i5FC6DE5FD4366035/image-dimensions/689x252?v=v2" width="689" height="252" role="button" title="Dan_Wroblewski_1-1710859063465.png" alt="Dan_Wroblewski_1-1710859063465.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Message received:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Dan_Wroblewski_2-1710859149269.png" style="width: 820px;"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/83289iC93DC3E8EEBE2969/image-dimensions/820x138?v=v2" width="820" height="138" role="button" title="Dan_Wroblewski_2-1710859149269.png" alt="Dan_Wroblewski_2-1710859149269.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Mar 2024 14:40:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/march-developer-challenge-cloudevents-week-3/m-p/13643254#M2027236</guid>
      <dc:creator>Dan_Wroblewski</dc:creator>
      <dc:date>2024-03-19T14:40:29Z</dc:date>
    </item>
    <item>
      <title>Re: March Developer Challenge - CloudEvents: Week 3</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/march-developer-challenge-cloudevents-week-3/m-p/13643326#M2027240</link>
      <description>&lt;P&gt;Code Python&lt;/P&gt;&lt;LI-CODE lang="abap"&gt;event = CloudEvent(attributes, data)

# Creates the HTTP request representation of the CloudEvent in binary content mode
headers, body = to_binary(event)

# Pretty print header
print("Header \n{")
for key, value in headers.items():
    print(f'  "{key}":"{value}",')
print("}")

# Pretty print json body
json_body = json.loads(body)
print(f"Body \n{json.dumps(json_body, indent=2)}")

topic = f"dev-challenge/week-3/{SAP_COMMUNITY_ID}/ce"
print(f"\nSending message to topic: {topic}")

response = requests.post(
    f"{SOLACE_TRANSPORT_PROTOCOL}://{SOLACE_HOST}:{SOLACE_PORT}/TOPIC/{topic}", data=body, headers=headers,
    auth=HTTPBasicAuth(SOLACE_USERNAME, SOLACE_PASSWORD))

print(f"Status code {response.status_code}")&lt;/LI-CODE&gt;&lt;P&gt;Result&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="emiliocampo_0-1710861025774.png" style="width: 400px;"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/83332iABC4C736494BADA2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="emiliocampo_0-1710861025774.png" alt="emiliocampo_0-1710861025774.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;And here is the valid entry in the app:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="emiliocampo_1-1710861131119.png" style="width: 400px;"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/83337iBDDDE711CA09BA21/image-size/medium?v=v2&amp;amp;px=400" role="button" title="emiliocampo_1-1710861131119.png" alt="emiliocampo_1-1710861131119.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Mar 2024 15:12:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/march-developer-challenge-cloudevents-week-3/m-p/13643326#M2027240</guid>
      <dc:creator>emiliocampo</dc:creator>
      <dc:date>2024-03-19T15:12:37Z</dc:date>
    </item>
    <item>
      <title>Re: March Developer Challenge - CloudEvents: Week 3</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/march-developer-challenge-cloudevents-week-3/m-p/13643534#M2027245</link>
      <description>&lt;LI-CODE lang="javascript"&gt;const { CloudEvent, HTTP } = require("cloudevents");
require('dotenv').config();

//cloud event data
const type = "com.awesome_company.sales_order.Updated.v1"
const source = "https://prod.illidian.awesome_company.com/sales_orders" 
const salesOrderID = "9024000013"
const company = "AWO01"
const year = 2024
const statusSO = "Shipped"

const subject = company + salesOrderID + year

const data = {
    "salesOrder": salesOrderID,
    "company": company,
    "year": year,
    "status": statusSO
}

const sapcommunityid = "xavisanse"
//creating event

const soEvent = new CloudEvent({type,source,subject,data,sapcommunityid})


//sending event to Solace
const solace_protocol = "https"
const solace_topic = `dev-challenge/week-3/${sapcommunityid}/ce`

const { headers, body } = HTTP.structured(soEvent);

const postURL = `${solace_protocol}://${process.env.SOLACE_HOST}:${process.env.SOLACE_PORT}/TOPIC/${solace_topic}`

// Basic Authentication
const basicAuth = 'Basic ' + Buffer.from(process.env.SOLACE_USER + ':' + process.env.SOLACE_PWD).toString('base64');

headers["Authorization"] = basicAuth;

console.log("### March Developer Challenge - CloudEvents: Week 3 ###\n");
console.log("- HTTP Request Event Headers - \n")
for (const key in headers) {
    console.log(`Key: "${key}", Value: "${headers[key]}"`);
  }

console.log("\n - HTTP Request Event Body - \n");
console.log(JSON.stringify(JSON.parse(body), null, 1) + "\n");
console.log("\n - HTTP Response - ")

// Sending POST request to Solace
fetch(postURL, {
    method: 'POST',
    headers: headers,
    body: body
})
.then(response =&amp;gt; {
    // Check if the response is OK
    if (!response.ok) {
        throw new Error('Network response was not ok');
    }
    // Return a response with HTTP status and a message
    return {
        status: response.status,
        message: 'CloudEvent successfully sent to Solace.'
    };
})
.then(responseObj =&amp;gt; {
    // Print the response
    console.log('Response:', responseObj);
})
.catch(error =&amp;gt; {
    // Print error message
    console.error('There was a problem with the fetch operation:', error);
});&lt;/LI-CODE&gt;&lt;P&gt;Screenshot of the call:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="xavisanse_0-1710877467070.png" style="width: 999px;"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/83417iC1DC89FEB761FEB4/image-size/large?v=v2&amp;amp;px=999" role="button" title="xavisanse_0-1710877467070.png" alt="xavisanse_0-1710877467070.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;url of the log:&amp;nbsp;&lt;A href="https://ce-dev-challenge-wk3.cfapps.eu10.hana.ondemand.com/consumed-messages/webapp/index.html#/messages(08ee690b-6751-4b5f-88f3-5ba584e5c786)" target="_blank"&gt;https://ce-dev-challenge-wk3.cfapps.eu10.hana.ondemand.com/consumed-messages/webapp/index.html#/messages(08ee690b-6751-4b5f-88f3-5ba584e5c786)&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Mar 2024 19:45:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/march-developer-challenge-cloudevents-week-3/m-p/13643534#M2027245</guid>
      <dc:creator>xavisanse</dc:creator>
      <dc:date>2024-03-19T19:45:34Z</dc:date>
    </item>
    <item>
      <title>Re: March Developer Challenge - CloudEvents: Week 3</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/march-developer-challenge-cloudevents-week-3/m-p/13643660#M2027246</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ajos_0-1710900220316.png" style="width: 400px;"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/83469i143518703EB7298D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ajos_0-1710900220316.png" alt="ajos_0-1710900220316.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ajos_1-1710900291570.png" style="width: 400px;"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/83470i80FC5F4CC2593045/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ajos_1-1710900291570.png" alt="ajos_1-1710900291570.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ajos_2-1710900318093.png" style="width: 400px;"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/83471iF88EDA6C542C3FD6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ajos_2-1710900318093.png" alt="ajos_2-1710900318093.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Mar 2024 02:05:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/march-developer-challenge-cloudevents-week-3/m-p/13643660#M2027246</guid>
      <dc:creator>ajos</dc:creator>
      <dc:date>2024-03-20T02:05:35Z</dc:date>
    </item>
    <item>
      <title>Re: March Developer Challenge - CloudEvents: Week 3</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/march-developer-challenge-cloudevents-week-3/m-p/13644532#M2027254</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2024-03-20 at 8.23.23 PM.png" style="width: 999px;"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/83890iB24FE5B5B462371D/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2024-03-20 at 8.23.23 PM.png" alt="Screenshot 2024-03-20 at 8.23.23 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Python Code:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;from cloudevents.conversion import to_structured
from cloudevents.http import CloudEvent
import json
import requests
import os

SAP_COMMUNITY_ID = "PriyankaChak"
REST_URL = "https://mr-connection-plh11u5eu6a.messaging.solace.cloud:9443"
username = os.environ.get('SOLACE_USERNAME')
password = os.environ.get('SOLACE_PASSWORD')


attributes = {
    "type": "com.servicechannel.WorkOrder.Created.v1",
    "source": "https://test.servicechannel.com/workorders",
    "sapcommunityid": SAP_COMMUNITY_ID
}


data = {
        "purchaseNumber": "84409626",
        "status": {
            "primary": "open"
        }
    }

topic = f"dev-challenge/week-3/{SAP_COMMUNITY_ID}/ce"



event = CloudEvent(attributes, data)

headers, body = to_structured(event)
print(f"Content-Type: {headers['content-type']}\n")
json_body = json.loads(body)
print(f"Sample Cloud Event: \n{json.dumps(json_body, indent=2)}")

response = requests.post(url=f"{REST_URL}/TOPIC/{topic}", auth=(username,password), headers=headers,data=body)
print(f"Response Status code:{response.status_code}")
&lt;/LI-CODE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2024-03-20 at 8.29.34 PM.png" style="width: 999px;"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/83891i3261C399A7E0927B/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2024-03-20 at 8.29.34 PM.png" alt="Screenshot 2024-03-20 at 8.29.34 PM.png" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Mar 2024 15:00:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/march-developer-challenge-cloudevents-week-3/m-p/13644532#M2027254</guid>
      <dc:creator>PriyankaChak</dc:creator>
      <dc:date>2024-03-20T15:00:12Z</dc:date>
    </item>
    <item>
      <title>Re: March Developer Challenge - CloudEvents: Week 3</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/march-developer-challenge-cloudevents-week-3/m-p/13644676#M2027256</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Sending the event with HTTP 200 response:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2024-03-20 17_06_33-New Request - My Workspace.png" style="width: 999px;"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/83979i783E6CF352565C62/image-size/large?v=v2&amp;amp;px=999" role="button" title="2024-03-20 17_06_33-New Request - My Workspace.png" alt="2024-03-20 17_06_33-New Request - My Workspace.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Validation in the app:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Fiori validation.png" style="width: 999px;"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/83980i7B725A5610976AEE/image-size/large?v=v2&amp;amp;px=999" role="button" title="Fiori validation.png" alt="Fiori validation.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;BR&lt;BR /&gt;Javier&lt;/P&gt;</description>
      <pubDate>Wed, 20 Mar 2024 16:14:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/march-developer-challenge-cloudevents-week-3/m-p/13644676#M2027256</guid>
      <dc:creator>fjaviergar07</dc:creator>
      <dc:date>2024-03-20T16:14:09Z</dc:date>
    </item>
    <item>
      <title>Re: March Developer Challenge - CloudEvents: Week 3</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/march-developer-challenge-cloudevents-week-3/m-p/13644852#M2027264</link>
      <description>&lt;P&gt;JavaScript code:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const axios = require("axios").default;
const { HTTP, CloudEvent, httpTransport, emitterFor } = require("cloudevents");
const baseUrl = "https://mr-connection-plh11u5eu6a.messaging.solace.cloud:9443";
const sapcommunityid = "MioYasuatke"

const ce = new CloudEvent({
    type: "my.bank.account.balanceChange",
    source: "/my/bank/account",
    datacontenttype: "application/cloudevents+json",
    sapcommunityid: sapcommunityid,
    data: {
        "account": "12345678"
    }
});
console.log(ce);

try {
    axios({
        method: "post",
        url: baseUrl + `/TOPIC/dev-challenge/week-3/${sapcommunityid}/ce`,
        data: ce,
        headers: {
            "content-type": "application/cloudevents+json",
            "authorization": "Basic c29sYWNlLWNsb3VkLWNsaWVudDptY3J0cDVtcHM1cTEybGZxZWQ1a2ZuZGJpMg=="
        }
    }).then(response =&amp;gt; {
        console.log(response.status);
    })    
} catch (error) {
    console.log("error!");
    console.log(error);
}&lt;/LI-CODE&gt;&lt;P&gt;Results:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MioYasuatke_1-1710967464253.png" style="width: 999px;"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/84065i8D63AAA2061C92C5/image-size/large?v=v2&amp;amp;px=999" role="button" title="MioYasuatke_1-1710967464253.png" alt="MioYasuatke_1-1710967464253.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MioYasuatke_0-1710967403227.png" style="width: 999px;"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/84064i69234B6574EE5F58/image-size/large?v=v2&amp;amp;px=999" role="button" title="MioYasuatke_0-1710967403227.png" alt="MioYasuatke_0-1710967403227.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Mar 2024 20:44:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/march-developer-challenge-cloudevents-week-3/m-p/13644852#M2027264</guid>
      <dc:creator>MioYasutake</dc:creator>
      <dc:date>2024-03-20T20:44:51Z</dc:date>
    </item>
    <item>
      <title>Re: March Developer Challenge - CloudEvents: Week 3</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/march-developer-challenge-cloudevents-week-3/m-p/13644854#M2027265</link>
      <description>&lt;P&gt;Good one... you can indeed post a message with any REST client but I do have to warn you that some code will be needed for the challenge next week &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Mar 2024 20:57:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/march-developer-challenge-cloudevents-week-3/m-p/13644854#M2027265</guid>
      <dc:creator>ajmaradiaga</dc:creator>
      <dc:date>2024-03-20T20:57:00Z</dc:date>
    </item>
    <item>
      <title>Re: March Developer Challenge - CloudEvents: Week 3</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/march-developer-challenge-cloudevents-week-3/m-p/13645073#M2027268</link>
      <description>&lt;P&gt;I will do my best &lt;span class="lia-unicode-emoji" title=":grinning_face_with_sweat:"&gt;😅&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Mar 2024 05:45:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/march-developer-challenge-cloudevents-week-3/m-p/13645073#M2027268</guid>
      <dc:creator>fjaviergar07</dc:creator>
      <dc:date>2024-03-21T05:45:46Z</dc:date>
    </item>
    <item>
      <title>Re: March Developer Challenge - CloudEvents: Week 3</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/march-developer-challenge-cloudevents-week-3/m-p/13645668#M2027275</link>
      <description>&lt;P&gt;Code in JS&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;//Send Message to IS event mesh
async function EventPost(){
  try {
    const response = await axios({
        method: "post",
        url: url,
        data: ce,
        headers: {
            Authorization: `Basic ${Buffer.from(`${user}:${pass}`).toString("base64")}`,
        },
    });
        console.log("Response:", response.status);
    } catch (error) {
        console.error("Error:", error);
}
};

EventPost();&lt;/LI-CODE&gt;&lt;P&gt;Result:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Alpesa1990_0-1711025617710.png" style="width: 400px;"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/84464iB5728321C1925162/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Alpesa1990_0-1711025617710.png" alt="Alpesa1990_0-1711025617710.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Check&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Alpesa1990_1-1711025791682.png" style="width: 400px;"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/84466i29D739DC145B403D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Alpesa1990_1-1711025791682.png" alt="Alpesa1990_1-1711025791682.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Mar 2024 12:56:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/march-developer-challenge-cloudevents-week-3/m-p/13645668#M2027275</guid>
      <dc:creator>Alpesa1990</dc:creator>
      <dc:date>2024-03-21T12:56:39Z</dc:date>
    </item>
    <item>
      <title>Re: March Developer Challenge - CloudEvents: Week 3</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/march-developer-challenge-cloudevents-week-3/m-p/13646143#M2027285</link>
      <description>&lt;P&gt;&lt;STRONG&gt;PWS:&lt;/STRONG&gt;&lt;/P&gt;&lt;LI-CODE lang="bash"&gt;$cloudEventStructuredHttpMessage = $cloudEvent | ConvertTo-HttpMessage -ContentMode Structured

Write-Host "Headers:" -ForegroundColor Green
$cloudEventStructuredHttpMessage.Headers | Out-Host

Write-Host "Body:" -ForegroundColor Green
Read-CloudEventData -CloudEvent $cloudEvent | Out-Host

$uri = "${SOLACE_TRANSPORT_PROTOCOL}://${SOLACE_HOST}:${SOLACE_PORT}/TOPIC/${topic}"
$body = Read-CloudEventData -CloudEvent $cloudEvent

$headers = @{
    "Content-Type" = "application/cloudevents+json"
    "Authorization" = "Basic " + [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes("$($SOLACE_USERNAME):$($SOLACE_PASSWORD)"))
}

try {
    $webResponse = Invoke-WebRequest -Method Post -Uri $uri -Headers $headers -Body $body -ContentType "application/json"
    Write-Host "Response status code:" $webResponse.StatusCode
}
catch {
    Write-Host "Error: $($_.Exception.Response.StatusCode.Value__) $($_.Exception.Message)"
}&lt;/LI-CODE&gt;&lt;P&gt;&lt;STRONG&gt;Result:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="r00k13d3v_0-1711054104420.png" style="width: 400px;"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/84697iE887676CCC4E67C7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="r00k13d3v_0-1711054104420.png" alt="r00k13d3v_0-1711054104420.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="r00k13d3v_1-1711054139278.png" style="width: 999px;"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/84698iD5F82BF87957C95B/image-size/large?v=v2&amp;amp;px=999" role="button" title="r00k13d3v_1-1711054139278.png" alt="r00k13d3v_1-1711054139278.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Mar 2024 20:50:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/march-developer-challenge-cloudevents-week-3/m-p/13646143#M2027285</guid>
      <dc:creator>r00k13d3v</dc:creator>
      <dc:date>2024-03-21T20:50:49Z</dc:date>
    </item>
    <item>
      <title>Re: March Developer Challenge - CloudEvents: Week 3</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/march-developer-challenge-cloudevents-week-3/m-p/13646614#M2027298</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Here is my solution:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="tobiasz_h_0-1711098134041.png" style="width: 400px;"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/84962i5518CF3BA73D303B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="tobiasz_h_0-1711098134041.png" alt="tobiasz_h_0-1711098134041.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="tobiasz_h_1-1711098161277.png" style="width: 400px;"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/84963iE989188BAC12026F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="tobiasz_h_1-1711098161277.png" alt="tobiasz_h_1-1711098161277.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="tobiasz_h_2-1711098181814.png" style="width: 400px;"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/84964i12F34E86F0EC0CB2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="tobiasz_h_2-1711098181814.png" alt="tobiasz_h_2-1711098181814.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Mar 2024 09:04:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/march-developer-challenge-cloudevents-week-3/m-p/13646614#M2027298</guid>
      <dc:creator>tobiasz_h</dc:creator>
      <dc:date>2024-03-22T09:04:07Z</dc:date>
    </item>
    <item>
      <title>Re: March Developer Challenge - CloudEvents: Week 3</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/march-developer-challenge-cloudevents-week-3/m-p/13647148#M2027308</link>
      <description>&lt;LI-CODE lang="abap"&gt;const response = await axios({
  method: "post",
  url: url + topic,
  headers: {
    //"Content-Type": "application/cloudevents+json",
    Authorization: `Basic ${Buffer.from(`${user}:${password}`).toString("base64")}`
  },
  data: ce,
});

console.log(
  "Response:", response.status);
} catch (error) {
  console.error("Error", error);
}
}
Send();&lt;/LI-CODE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="geek_0-1711132018342.png" style="width: 400px;"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/85201iEA6040839510FA35/image-size/medium?v=v2&amp;amp;px=400" role="button" title="geek_0-1711132018342.png" alt="geek_0-1711132018342.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="geek_1-1711132172933.png" style="width: 400px;"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/85206i4B0B216CAE76621F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="geek_1-1711132172933.png" alt="geek_1-1711132172933.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Mar 2024 18:30:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/march-developer-challenge-cloudevents-week-3/m-p/13647148#M2027308</guid>
      <dc:creator>geek61</dc:creator>
      <dc:date>2024-03-22T18:30:13Z</dc:date>
    </item>
  </channel>
</rss>

