How to stop message replication in azure service bus from D365 F&O Multiple Legal Entities?

Fareeha Sattar Shaikh 45 Reputation points
2024-05-31T10:55:30.41+00:00

I have created an azure service bus topic that receives messages from D365 F&O Data Events. In my D365 F&O i have three legal entities. And for each legal entity I have enabled Data Event for Vendor update.

If I am updating a vendor in Legal Entity A, in service bus I am receiving messages thrice. In all three messages the legal entity is legal entity A, but still i think because I am using same service bus topic for all three legal entities; it is some how replicating the message. All three messages have different message id; so duplicate detection rule is not working.

Any idea how to resolve the issue?

Azure Service Bus
Azure Service Bus
An Azure service that provides cloud messaging as a service and hybrid integration.
591 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Fareeha Sattar Shaikh 45 Reputation points
    2024-06-03T08:58:36.9966667+00:00

    Hi,

    Thanks for your suggestions. But it got resolved by not activating the dataevent for each data area. Instead I left the legal entity field empty, and it is activated for all entities. And in azure service bus, messages are not replicated too.

    1 person found this answer helpful.
    0 comments No comments

  2. Vidya Viraktamath 160 Reputation points Microsoft Employee
    2024-05-31T11:49:47.9333333+00:00

    The issue you're experiencing seems to be related to the configuration of your D365 F&O Data Events rather than the Azure Service Bus Topic itself. Here are a few things you could check:

    1. Data Event Configuration: Ensure that the Data Event is not configured to trigger multiple times for a single update in each legal entity.
    2. Middleware or Logic Apps: If you're using any middleware or Logic Apps between D365 F&O and the Service Bus Topic, ensure that these are not duplicating the messages.
    3. D365 F&O Integration Settings: Check the integration settings in D365 F&O to ensure that it's not sending multiple messages for a single event.
    4. Review Duplicate Detection Configuration: Ensure that duplicate detection is properly configured on your Service Bus topic. However, if the messages have different MessageId values, they will not be considered duplicates. If the built-in duplicate detection isn’t suitable, consider implementing a custom deduplication mechanism in your message processing logic. This could involve checking a database or cache to see if the message has already been processed. Reference - https://learn.microsoft.com/en-us/azure/service-bus-messaging/duplicate-detection.
    5. Check Message Publishing Logic: Review the logic in D365 F&O that publishes messages to the Service Bus topic. There might be a loop or repeated logic that sends the same message for each legal entity.
    6. Use Filtering: You can implement filtering on the Service Bus subscription to only receive messages relevant to a specific legal entity. Reference - https://learn.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/business-events/how-to/how-to-servicebus
    7. Monitor and Log: Set up monitoring and logging to capture detailed information about the messages being sent and received. This can help identify where the duplication is occurring.

    Hope this helps. If you have any follow-up questions, please let me know. I would be happy to help.


    Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.