0

I have one topic DemoTopic and having 2 subscriptions 'sub1' and sub2

my message payload is like this

{
   "data": [
            {
                "id": "1",
                "name": "a",
                "pid": "p1"
            },
            {
                "id": "2",
                "name": "b",
                "pid": "p2"
            },
            {
                "id": "3",
                "name": "c",
                "pid": "p3"
            }
            ]
}

if pid value is p1 and p2 then send messsage to sub1

how to create a filter for this using p1 and p2 value?

Neo
  • 15,491
  • 59
  • 215
  • 405

1 Answers1

1

Subscriptions can only filter messages on some system properties and user/custom properties (aka headers). If your message contains the data required for filtering, you should promote those property values to the headers when dispatching messages.

Sean Feldman
  • 23,443
  • 7
  • 55
  • 80