Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Same endpoint name with different db schemas causes unexpected behaviour #1378

Open
jpalac opened this issue Jul 1, 2024 · 0 comments
Open

Comments

@jpalac
Copy link
Contributor

jpalac commented Jul 1, 2024

Scenario

It is possible to use different schemas for endpoints in the transport,
If using pub/sub, all endpoints in the system must be configured to use the same subscription table

If schemas are used to separate/group different system functionality (e.g. sales and stocktake), then it's possible that there might be the same endpoint names in both: sales.office, stocktake.office

Pub/Sub

This causes a problem in pub/sub as the subscription table uses the Endpoint and Topic fields as the key, which would be the same for each endpoint in the above scenario, since the schema is not part of the endpoint name - it is stored in the QueueAddress field that is not part of the table key.

If using EnableInstallers, if both sales.office and stocktake.office subscribe to an OfficeHoursChanged event, then the first endpoint that starts records its subscription in the SubscriptionRouting table, and the last endpoint to start would then overwrite that record with its subscription. This results in only one of the endpoints being subscribed to the event.

Because of the primary key in the subscription table. the subscriptions cannot be corrected by creating them manually.

Audit/Monitoring

Two known endpoints are registered, but since they are named the same, they are seen as the same logical endpoint (2 different instances of the same endpoint), where in fact they could be very different logical endpoints.
It is also not possible to easily distinguish them in ServicePulse if they are running on the same host, as they are both showing up as office@hostname

Suggested Improvement

Introduce some kind of validation for this, as it seems to put the system in an invalid state.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant