Message Headers and Properties Transfer Behavior
source link: https://blogs.sap.com/2022/09/08/message-headers-and-properties-transfer-behavior/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Message Headers and Properties Transfer Behavior
Retained or not retained? That’s the question.
When it comes to asynchronously passing messages between IFlows using a Data Store or JMS Queue on Cloud Integration, I was often scratching my head when trying to remember in which case headers or properties are passed on to the receiver IFlow. Sometimes they get retained and therefore passed on, sometimes they get lost and not passed on.
In the synchronous case of forwarding a message to another IFlow, using Process Direct Adapter, it’s less confusing as it’s more simple: Headers are retained, properties lost. For the sake of completeness, I have also added the synchronous cases at the end of the table.
But the asynchronous case, where you could use the Data Store or JMS Queues, this is not so straightforward as header parameters and properties are treated differently depending on the technique used to store or forward messages in between processing by multiple IFlows.
This post aims to provide an overview serving as a quick reference for developers designing or developing IFlows. The first part is about the asynchronous cases (temporarily persisting data and picking them up from another IFlow) and is split up in two parts, one for Data Store and one for JMS Queues. The second part is for the asynchronous cases.
The table lists if a writing step or receiver adapter retains some of the data and on the other hand if a reading step or sender adapter makes the data available again on the receiver’s Integration Process side.
Activity |
Headers |
Properties |
Remarks |
---|---|---|---|
Asynchronous Messaging |
|||
Data Store Steps/Adapter |
|||
Save in Data Store (Write step) |
retained (if configured in channel) |
Configuration needed. |
|
Read any message from Data Store (=> get all entries in bulk) – Select Operation |
see 1) |
||
Read specific message from Data Store (by specifying the entry ID) – Get Operation |
available |
see 2) |
|
1) This step creates a bulk (multi-) message with a messages node and a message node per message (with attribute id containing the message ID). Therefore it’s logically not possible to retain headers/properties for every message in the actual message properties of the bulk message. However, there’s a workaround if you still need to retrieve headers! See comment at Get Operation, don’t use the Select Step. 2) We can use a DataStore sender adapter as Iflow sender channel – instead of using a Select Step – which sets the header SapDataStoreId and then use this value in the Get step to get any DS entry including its header! See also my follow up blog (coming soon). JMS Adapter |
|||
JMS queue write – JMS receiver channel |
retained (if configured in channel) |
Configuration needed. |
|
JMS queue read – JMS sender channel |
available |
||
Persist Step |
|||
Save message with Persist step |
retained |
Can only be read with external tools (like CPI Helper), therefore only for monitoring purposes. |
|
Synchronous Messaging |
|||
Process Direct Adapter |
|||
PD receiver channel |
retained |
||
PD sender channel |
available |
Remember to list the headers that you whish to retrieve in the field Allowed Headers of the integration flow’s runtime configuration. |
|
HTTP Adapter |
|||
Same behavior as with Process Direct. |
Hope this is helpful for others as it is for me.
In case of questions or if you find any errors or inconsistencies, please let me know.
Recommend
-
45
Today I’ll continue the little CMake tutorial series. We’ll add a few options and a bit of fine-tuning to the compilation of our example project. This post is part of a series about CMake: ...
-
5
Spacings and CSS Custom properties Published on 28.06.2018, by Louis HoebregtsEarly on when working on the website for
-
4
188043 – Add support for ScrollOptions' ScrollBehavior and CSS scroll-behavior properties WebKit Bugzilla Bug 188043: Add support for ScrollOptions' ScrollBehavior and CSS scroll-beha...
-
3
CSRF, CORS, and HTTP Security headers Demystified With an increasing number of breaches, intrusions, and data thefts, securing a web application is extremely important. On the other hand, programmers often do not have a...
-
2
Security and Caching headers with S3 websitesMarch 22, 2018Using Lambda @ Edge to add headers to S3 websites There are a lot of advantages to running a website on Amazon S3. Unfortunately, for a long time, users were limited...
-
7
How to Remove Headers and Footers From PDF Tables By David Perry Published 14 hours ago Want to remove headers and footers from yo...
-
4
The surprising behavior of "important CSS custom properties"This post is part of my Today I learned series in which I share all my web development learnings.
-
4
How to Use Headers and Footers in Google Docs By Amir M. Bohlooli Published 11 hours ago Want to make your doc...
-
3
CSS For URLs and HTTP Headers 2022-11-27 A couple things have been swirling in my head:
-
8
Dinesh Chandra Yenduri July 4, 2023 3 min...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK