Start consuming from the client api
()
| 62 | |
| 63 | // Start consuming from the client api |
| 64 | func (t *OutputSendToDeviceConsumer) Start() error { |
| 65 | return jetstream.JetStreamConsumer( |
| 66 | t.ctx, t.jetstream, t.topic, t.durable, t.onMessage, |
| 67 | nats.DeliverAll(), nats.ManualAck(), |
| 68 | ) |
| 69 | } |
| 70 | |
| 71 | // onMessage is called in response to a message received on the |
| 72 | // send-to-device events topic from the client api. |