mirror of
https://github.com/mainflux/mainflux.git
synced 2025-05-02 22:17:10 +08:00
Rename NATS subjects for HTTP & normalizer (#207)
* Change NATS subject name Signed-off-by: Dejan Mijic <dejan@mainflux.com> * Change normalizer subscription name Signed-off-by: Dejan Mijic <dejan@mainflux.com>
This commit is contained in:
parent
36ca9015ff
commit
523716b090
@ -2,13 +2,13 @@
|
||||
package nats
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/golang/protobuf/proto"
|
||||
"github.com/mainflux/mainflux"
|
||||
broker "github.com/nats-io/go-nats"
|
||||
)
|
||||
|
||||
const topic string = "src.http"
|
||||
|
||||
var _ mainflux.MessagePublisher = (*natsPublisher)(nil)
|
||||
|
||||
type natsPublisher struct {
|
||||
@ -26,5 +26,6 @@ func (pub *natsPublisher) Publish(msg mainflux.RawMessage) error {
|
||||
return err
|
||||
}
|
||||
|
||||
return pub.nc.Publish(topic, data)
|
||||
subject := fmt.Sprintf("channel.%s", msg.Channel)
|
||||
return pub.nc.Publish(subject, data)
|
||||
}
|
||||
|
@ -12,7 +12,7 @@ import (
|
||||
|
||||
const (
|
||||
queue string = "normalizers"
|
||||
subject string = "src.*"
|
||||
subject string = "channel.*"
|
||||
output string = "normalized"
|
||||
)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user