简体   繁体   中英

Weblogic 12c - EJB 3.1 MDB How to apply filtering on JSON Message

I have a requirement to handle JSON Messages coming to a Topic.The topic will get different kinds of JSON Messages

The JSON Message Payload will have an field to indicate the event type.Is there a way in MDB to apply message filters on the JSON Element Path and send them to different JMS Queues based the event type without unmarshalling and inspecting the message ?

Any help or links to further research on this topic would be of great help

Thanks

Filtering based on Message Content is not possible in MessageDriven Bean.

However,

in a similar Situation, I agreed with the interface partners on setting a custom property to a value indicating the business case and used different Message Property Selectors for each MessageDrivenBean Handler.

If you have to, you could create a Message Dispatcher Message Bean, which parses the JSON, sets the "business case related Property" and delegates to an internal Queue, where multiple MDB's are Listening, each with specific selector and handles the Message without having to parse it again.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM