cancel
Showing results for 
Search instead for 
Did you mean: 

Create and Handle empty msg in JMS receiver Adapter

Former Member
0 Kudos

Hi,

In my interface scenario, I will have to create a msg output if certain conditions are met and should not create a msg if otherwise..

I am using a Graphical Mapping and the receiver is JMS. I have some questions..

1. Using Graphical mapping, Can I create an empty msg - If I dont map the root node if the conditions are not met, what happens to the msg during runtime ?? Will it create empty payload and does it error out as there is empty payload ??

2. Like File adapter - is there a way to Ignore empty msg in JMS receiver adapter - so that it doesnt write any empty msgs i nthe queue..

Any ideas/suggestions/experiences greatly appreciated please...

Thank you

Thanujja..

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Natesa,

You can do a conditional receiver determination. You put your conditions and if conditions met send to your JMS receiver. You also select the option End Message Procesing without Errors (Restart not possible) option in receiver determination. So if your conditions met it goes to JMS Receiver else it will fail the message in XI without Error.

Regards,

---Satish

Former Member
0 Kudos

Oh..Perhaps I didnt elaborate more...We do a lookup inside the mapping to ECC system and based on the RFC response, we create the output msg..and hence this cannot be done in receiver determination...Even If I choose enhanced receiver determination and go with mapping to determine my receivers, I would have to call the RFC twice to determine receiver first and then in actual mapping again which I am hesitatnt to do....

I want to keep the RFC call one time...so I am gng for static receiver determination but doing RFC lookup in the mapping and based on the return value, we form the msg..So If the return value is an exception, we dont want to send that msg..

Hope the requirments are more clear now..Thanks for your reply..

Former Member
0 Kudos

Natesa,

You do your lookup in mapping and once the lookup is successful then put as success or ok in any field or a segment. Then you use that field in receiver determination as a condition. If you have that field then pass it to receiver else you dont have then it is an exception and use the other option as I told you. Here you are calling lookup only once.

Regards,

---Satish

Former Member
0 Kudos

Satish,

We dont do receiver determination based on the output msg - its based on the input msg ...How will your suggestion work?

Former Member
0 Kudos

Natesa,

My bet. I am sorry I am wrong.

One thing comes to my mind is you can do a multi mapping. So if it is ok then send to one receiver and if it exception then send as flat file which you dont use.

Here since only one mapping is going to execute and the other going to fail you can write your own message exception in mapping stating "Its a know error". This is because if it is in produciton if this fails then it creates an alert. So just to tell to the end users it is ok you are populating the generic error. I know its not a good solution, but a work around kind of thing.

Regards,

---Satish

Former Member
0 Kudos

No I dont want to do work arounds...The volume of this msg will be bigger and I am looking into a more efficient way...

Thank you for your suggestions..

Thanujja

Former Member
0 Kudos

Anybody has stopped empty message being written by JMS receiver adapter in the queue? Any suggestions please...How do I stop an empty payload from being written into the queue??