components-contrib/pubsub
Yaron Schneider 298ac1c381
Update Readme.md (#79)
2019-10-30 00:02:25 -07:00
..
nats NATS pubsub component implementation (#65) 2019-10-29 23:48:55 -07:00
redis Adding license header and updating to MIT license. (#26) 2019-10-09 10:58:08 -07:00
Readme.md Update Readme.md (#79) 2019-10-30 00:02:25 -07:00
envelope.go added cloud events content type (#32) 2019-10-14 12:52:39 -07:00
envelope_test.go Adding license header and updating to MIT license. (#26) 2019-10-09 10:58:08 -07:00
metadata.go Adding license header and updating to MIT license. (#26) 2019-10-09 10:58:08 -07:00
pubsub.go Adding license header and updating to MIT license. (#26) 2019-10-09 10:58:08 -07:00
requests.go Adding license header and updating to MIT license. (#26) 2019-10-09 10:58:08 -07:00

Readme.md

Pub Sub

Pub Subs provide a common way to interact with different message bus implementations to achieve reliable, high-scale scenarios based on event-driven async communications, while allowing users to opt-in to advanced capabilities using defined metadata.

Currently supported pub-subs are:

  • Redis Streams
  • NATS

Implementing a new Pub Sub

A compliant pub sub needs to implement the following interface:

type PubSub interface {
	Init(metadata Metadata) error
	Publish(req *PublishRequest) error
	Subscribe(req SubscribeRequest, handler func(msg *NewMessage) error) error
}