Skip to content

Conversation

@Gsantomaggio
Copy link
Member

With this PR is possible to handle the consumer closing with dedicate channel:

channelClose := make(chan stream.Event, 1)
go func() {
    event := <-channelClose
    fmt.Printf("Consumer: %s closed on the stream: %s, reason: %s \n", event.Name, event.StreamName, event.Reason)
 }()

confirmation:

	chPublishConfirm := make(chan []int64, 1)
	go func(ch chan []int64) {
		messagesIds := <-ch
		fmt.Printf("Confirmed %d messages \n \n ", len(messagesIds))
	}(chPublishConfirm)

@Gsantomaggio Gsantomaggio merged commit f01da2a into main May 19, 2021
@Gsantomaggio Gsantomaggio deleted the handle_errors branch May 23, 2021 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants