Skip to content

Commit

Permalink
fix(eventsub): correct names for nats subscriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
Satont committed May 31, 2024
1 parent bd2e39d commit d7c7714
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions apps/eventsub/internal/bus-listener/bus-listener.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@ func New(opts Opts) (*BusListener, error) {
fx.Hook{
OnStart: func(ctx context.Context) error {
if err := impl.bus.EventSub.SubscribeToAllEvents.SubscribeGroup(
"eventsub.subscribeAll",
"eventsub",
impl.subscribeToAllEvents,
); err != nil {
return err
}

if err := impl.bus.EventSub.Subscribe.SubscribeGroup(
"eventsub.subscribe",
"eventsub",
impl.subscribe,
); err != nil {
return err
Expand Down
2 changes: 1 addition & 1 deletion libs/bus-core/bus.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ func NewNatsBus(nc *nats.Conn) *Bus {
EventSub: &eventSubBus{
SubscribeToAllEvents: NewNatsQueue[eventsub.EventsubSubscribeToAllEventsRequest, struct{}](
nc,
eventsub.EventsubSubscribeSubject,
eventsub.EventsubSubscribeAllSubject,
1*time.Minute,
nats.GOB_ENCODER,
),
Expand Down
3 changes: 2 additions & 1 deletion libs/bus-core/eventsub/eventsub.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
package eventsub

const (
EventsubSubscribeSubject = "eventsub.subscribe"
EventsubSubscribeAllSubject = "eventsub.subscribeAll"
EventsubSubscribeSubject = "eventsub.subscribe"
)

type EventsubSubscribeToAllEventsRequest struct {
Expand Down

0 comments on commit d7c7714

Please sign in to comment.