Subscription null value vs string "null"


In JSON configuration of a engine connection, the publish message component property Subscription can be a source of confusion.

"Subscription" : "null" 

is not the same as

"Subscription" : null

The first will result in the publish message attempt to publish a message to a subscription named "null" because the JSON is interpreted the value as a string.

The second will be interpreted as a JSON null value, not a string. Messages will be published to the topic and will appear on each subscription queue.

In the example below, the "Subscription" property is set to "sap". This means that the topic publisher will only publish to that one subscription. Normally this property should be set to null which will result in a copy of the message in all of the related subscriptions.

{
    "name": "Publish to Azure Service Bus",
    "type": "Bentley.Interoperability.ServiceBus.Azure.TopicPublisher",
    "state": {
        "Topic": "processrequestsforwork",
        "Subscription": "sap"
     }
}