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

Inline Publishing #8

Merged
merged 7 commits into from
Jan 5, 2022
Merged

Inline Publishing #8

merged 7 commits into from
Jan 5, 2022

Conversation

mochi-co
Copy link
Collaborator

@mochi-co mochi-co commented Jan 5, 2022

Adds the ability to directly publish messages from the embedding service using the func (s *Server) Publish(topic string, payload []byte, retain bool) error method.

Also provides various commentary cleanups for clarity.

mochi added 7 commits January 5, 2022 13:13
Ensure we're not committing any binaries
When the broker is embedded in a larger Go codebase, it is beneficial to be able to publish messages directly from the system to topics. This change provides a Publish method which adds messages to an inline publishing queue in a separate goroutine, which are then processed in the standard way and issued to all clients with matching topic filters.
Adds an example file which demonstrates the usage of the `Publish` method. This file will also be used to demonstrate event hooks.
Adds information about direct publishing and moves performance section
@codecov-commenter
Copy link

Codecov Report

Merging #8 (dec8802) into master (124be96) will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master       #8      +/-   ##
==========================================
+ Coverage   98.94%   98.95%   +0.01%     
==========================================
  Files          18       18              
  Lines        1989     2017      +28     
==========================================
+ Hits         1968     1996      +28     
  Misses         19       19              
  Partials        2        2              
Impacted Files Coverage Δ
server/internal/circ/writer.go 100.00% <ø> (ø)
server/listeners/tcp.go 100.00% <ø> (ø)
server/internal/clients/clients.go 98.92% <100.00%> (ø)
server/server.go 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 124be96...dec8802. Read the comment docs.

@mochi-co mochi-co linked an issue Jan 5, 2022 that may be closed by this pull request
@mochi-co mochi-co removed a link to an issue Jan 5, 2022
@mochi-co mochi-co merged commit f3e7469 into master Jan 5, 2022
@mochi-co mochi-co deleted the feature/inline-publish branch January 5, 2022 17:58
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