Love this library, working very well so far.
How can I publish a custom Property that I can use to filter my message.
For example this is a sample test message.. and I'd like only messages with the field data.Authentication.Name set equal to "Jimmy" to be forwarded to the subscriber ....
{
""eventID"": ""74c5a2db-2a9a-4ce3-93c5-c77fb566b8d7"",
""cloudEventsVersion"": ""0.1"",
""eventType"": ""AuthenticationDefinitionCreatedDomainEvent"",
""eventTypeVersion"": ""1.0"",
""source"": ""ede603ab-4e15-400c-8d4a-c903166b590d-created-event#AuthenticationDefinitionCreatedDomainEvent"",
""eventTime"": ""01/26/2023 23:00:50 +00:00"",
""data"": {
""AuthenticationDefinition"": {
""AccessTokenExpiration"": 0,
""AccessTokenUrl"": ""string"",
""Audience"": ""string"",
""AuthenticationType"": 0,
""AuthorizationUrl"": ""string"",
""CheckAuthVerification"": true,
""ClientId"": ""string"",
""ClientSecret"": ""string"",
""DisableIntrospection"": true,
""Name"": ""Jimmy"",
""OAuthCallbackUrl"": ""string"",
""Scopes"": ""string"",
""UseClientCredentialFlow"": true,
""modelVersion"": ""0.0.0"",
""id"": ""8ee21697-b51c-493b-b0e5-fb26aa91210f"",
""deleted"": false,
""createdAt"": ""2023-01-26T18:00:50.8332556-05:00"",
""modifiedAt"": ""2023-01-26T18:00:50.8332557-05:00"",
""deletedAt"": null,
""modifiedBy"": ""d9ecc60b-4867-4cb8-9a8d-5f5971f4558d""
},
""Payload"": null,
""AuthenticationDefinitionId"": ""8ee21697-b51c-493b-b0e5-fb26aa91210f"",
""AggregateId"": ""8ee21697-b51c-493b-b0e5-fb26aa91210f"",
""Action"": ""AuthenticationDefinitionCreatedDomainEvent"",
""ModelKey"": ""ede603ab-4e15-400c-8d4a-c903166b590d-created-event"",
""MessageHeaders"": {
""domain-command"": ""Create"",
""nameidentifier"": ""d9ecc60b-4867-4cb8-9a8d-5f5971f4558d"",
""oid"": ""d9ecc60b-4867-4cb8-9a8d-5f5971f4558d"",
""role"": ""access:metamodel-api"",
""tenant"": ""e01a7bdc-ab45-48b0-ac38-0fac30cc1d90"",
""iss"": ""https://login.microsoftonline.com/e01a7bdc-ab45-48b0-ac38-0fac30cc1d90/v2.0"",
""exp"": ""1674773871"",
""aud"": ""e86b11e0-1394-48f2-b298-0fb58f330c4e"",
""azp"": ""875879f8-dbcd-4f06-81ab-c0079df6ecd6""
},
""GeneratedFromModelVersion"": """",
""GeneratedSequence"": """",
""id"": ""74c5a2db-2a9a-4ce3-93c5-c77fb566b8d7"",
""deleted"": false,
""createdAt"": ""2023-01-26T18:00:50.833257-05:00"",
""modifiedAt"": null,
""deletedAt"": null,
""modifiedBy"": null
}
}
I see in the BaseAzureServiceBusPublisher class it appears to be adding a number of ApplicationProperties for ProcessorType, ProcessSender etc...
It also seems to be pulling from a headers section and adding Application Properties per each.
Is there a way of extracting the value for data.Authentication.Name property from the message and adding it to "NameCheck" such that I can add a rule in Azure Service bus such as: NameCheck = 'Jimmy'
.