Skip to content

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.

2 participants