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

Adds the concept of a publisher #4

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

normanj-bitquill
Copy link

Some applications will only publish events to faktory. Using the worker model is not ideal in these cases.

This change adds a publisher that can only be used to publish events. The connection is not managed and will timeout if not used frequently enough. It will automatically reconnect if the socket was closed.

It looks like there could be a threading issue with publishing events concurrently, since they will use the same socket instance without anything preventing concurrent access. An application could pool publishers to deal with this or use a new connection every time.

From this page:
https://github.com/contribsys/faktory/blob/main/docs/protocol-specification.md

Clients that are not consumers MUST NOT send BEAT commands, and MUST NOT enter the Quiet or Terminating stages.

rgm and others added 2 commits April 28, 2023 19:00
Lets us lean on this lib with git coordinates instead of publishing a
jar.
* A publisher can only send jobs to faktory
* No need to register jobs to use a publisher
* A publisher has an associated connection but no work will be done to keep it alive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants