NatsBridge
org.mbari.oni.etc.nats.NatsBridge
class NatsBridge(sink: NatsMessage => Unit, source: Option[String] = ...) extends AutoCloseable
Translates ChangeEvents published on the ChangeBus into NatsMessages and forwards them to the sink. Only changes to concept data made by this instance are forwarded: see ChangeEvent.affectsConceptData. Remote events (learned from other instances) are never forwarded, otherwise instances would echo each other's messages forever.
Value parameters
- sink
-
Receives the messages, typically NatsPublisher.offer
- source
-
Stamped on each message so receivers can ignore their own messages
Attributes
- Graph
-
- Supertypes
-
trait AutoCloseableclass Objecttrait Matchableclass Any
Members list
In this article