Skip to content

Commit

Permalink
fix rest call for receive event store
Browse files Browse the repository at this point in the history
  • Loading branch information
kubemq committed Jul 17, 2019
1 parent 383b403 commit a6d85d1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions examples/pubsub/persistence/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ func main() {
defer sender.Close()

receiver, err := kubemq.NewClient(ctx,
kubemq.WithAddress("localhost", 50000),
kubemq.WithClientId("test-event-store-sender-id"),
kubemq.WithTransportType(kubemq.TransportTypeGRPC))
kubemq.WithUri("http://localhost:9090"),
kubemq.WithClientId("test-event-rest-client"),
kubemq.WithTransportType(kubemq.TransportTypeRest))
if err != nil {
log.Fatal(err)
}
Expand Down
3 changes: 2 additions & 1 deletion rest.go
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,8 @@ func (rt *restTransport) SubscribeToEventsStore(ctx context.Context, channel, gr
eventsCh := make(chan *EventStoreReceive, rt.opts.receiveBufferSize)
subOption := subscriptionOption{}
opt.apply(&subOption)
uri := fmt.Sprintf("%s/subscribe/events?&client_id=%s&channel=%s&group=%s&subscribe_type=%s&events_store_type_data=%d&events_store_type_value=%d", rt.wsAddress, rt.id, channel, group, "persistence", subOption.kind, subOption.value)
uri := fmt.Sprintf("%s/subscribe/events?&client_id=%s&channel=%s&group=%s&subscribe_type=%s&events_store_type_data=%d&events_store_type_value=%d", rt.wsAddress, rt.id, channel, group, "events_store", subOption.kind, subOption.value)
fmt.Println(uri)
rxChan := make(chan string)
ready := make(chan struct{}, 1)
wsErrCh := make(chan error, 1)
Expand Down

0 comments on commit a6d85d1

Please sign in to comment.