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

Send-only endpoint fails when attempts to publish events before any other endpoint had a chance to run #44

Open
SeanFeldman opened this Issue Jan 23, 2019 · 3 comments

Comments

Projects
None yet
3 participants
@SeanFeldman
Copy link
Contributor

SeanFeldman commented Jan 23, 2019

Who's affected

Anyone using pub/sub in one of the following scenarios:

  1. The Subscriber has never executed and the publisher run firs w/o installers enabled.
  2. The subscribers has never executed and the publisher run as send-only endpoint.

Symptoms

Publisher throws an exception when trying to publish an event.

Details

Topic for published events is created along with queues. If an endpoint is either send-only or installers have been disabled, queue creation will not take place. Subsequently, the topic won't be created either. In case subscribers have not executed, it will mean there will be no topic to publish events to and the publisher will throw an exception.

Original issue

Raised on the public forum here.

Workarounds

  1. Create topic manually.
  2. Run any non send-only endpoint that has installers enabled first.

@SeanFeldman SeanFeldman added the Bug label Jan 23, 2019

@SzymonPobiega SzymonPobiega changed the title Send-only endpoint fails when attempts to publish events before subscribers had a chance to run [Limited / Major] Send-only endpoint fails when attempts to publish events before subscribers had a chance to run Jan 23, 2019

@SzymonPobiega

This comment has been minimized.

Copy link
Member

SzymonPobiega commented Jan 23, 2019

@SeanFeldman do you know what should be the correct behavior?

@Particular Particular deleted a comment from WojcikMike Jan 23, 2019

@SzymonPobiega SzymonPobiega changed the title [Limited / Major] Send-only endpoint fails when attempts to publish events before subscribers had a chance to run Send-only endpoint fails when attempts to publish events before subscribers had a chance to run Jan 23, 2019

@SeanFeldman

This comment has been minimized.

Copy link
Contributor Author

SeanFeldman commented Jan 23, 2019

The legacy ASB had this behaviour, but arguably, it was the way it was.
For the new transport, endpoints should be able to just publish. Wherever there's a topic or not. This will also be more aligned with broker-based transports such as RabbitMQ that handles this situation.

@SeanFeldman SeanFeldman changed the title Send-only endpoint fails when attempts to publish events before subscribers had a chance to run Send-only endpoint fails when attempts to publish events before any other endpoint had a chance to run Jan 23, 2019

@SeanFeldman SeanFeldman added this to the 2.0.0 milestone Jan 27, 2019

@SeanFeldman

This comment has been minimized.

Copy link
Contributor Author

SeanFeldman commented Jan 27, 2019

Fix for this issue will require a breaking change. Therefore we will introduce it in the next major release rather than right away as there are viable workarounds. As well as topic creation needs to take place once and once on;y per environment.

When version 2.0.0 is worked on, we'll include the fix for this issue as well.

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