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

JMS: Expose connection status of consumer and producer #1251

Closed
andreas-schroeder opened this issue Sep 29, 2018 · 1 comment
Closed

JMS: Expose connection status of consumer and producer #1251

andreas-schroeder opened this issue Sep 29, 2018 · 1 comment
Labels
Milestone

Comments

@andreas-schroeder
Copy link
Contributor

Now that the JMS producer and consumer stages perform retries (a potentially infinite amount of times), it is hard / impossible to know when the connectivity to the JMS broker is healthy and when it isn't.

Before connection retries were implemented, it was possible to get the connection status (indirectly) from the stream's status:

  • successfully created and running stream -> connection established and healthy
  • stream completed with failure -> connection is unhealthy

In my setting, I used the JMS connectivity status as a part of the readiness check of the Kubernetes pod my app is running in (https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#define-readiness-probes). In this way, I can signal to Kubernetes that

  • when the pod is already running, the pod should not receive traffic from its load balancer.
  • when the pod is a newly created one during a rolling deployment, this deployment needs to be halted until the pod becomes ready (which will never happen in case the JMS connectivity is mis-configured). This allows to prevent replacement of working pods by e.g. mis-configured ones.

So all in all, I think it is very helpful to know what the current connectivity status of the JMS consumer and producers is, and that it would be beneficial to expose it through the stage's materialized value.

@andreas-schroeder
Copy link
Contributor Author

Here's the test that I managed to make fail locally quite often: https://travis-ci.org/akka/alpakka/jobs/435270299#L690
This hints to me that re-connecting can fail, and needs some addition to be 100% failure-proof.

@ennru ennru added the p:jms label Oct 9, 2018
ennru pushed a commit that referenced this issue Oct 30, 2018
@ennru ennru added this to the 1.0-M2 milestone Oct 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants