INNER CODE UNIT · Go

func

owlistic-notes/owlistic · src/backend/broker/consumer.go:117

func (c *NatsConsumer) GetMessageChannel() chan *nats.Msg {
	return c.msgChan
}

// Close implements the Consumer interface
func (c *NatsConsumer) Close() {
	c.mutex.Lock()
	defer c.mutex.Unlock()

	if !c.closed {
		c.closed = true

		// Close the underlying connection if it exists
		if c.nc != nil {
			c.nc.Close()
		}

		// We intentionally don't close the message channel

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…