analytics-go icon indicating copy to clipboard operation
analytics-go copied to clipboard

Feature request - Flush method

Open pwfcurry opened this issue 6 years ago • 3 comments

We've had some problems with message ordering where the solution from Segment support has been to flush after each identify call (also mentioned here in the docs: https://segment.com/docs/destinations/intercom/#server-side-race-condition).

However as there is no way to manually flush the golang client, we would have to call the HTTP API directly.

Thanks!

pwfcurry avatar Feb 15 '19 10:02 pwfcurry

@pwfcurry, we also had a situation that we wanted to have a flush. An alternative that is working well for us is to .close, and recreate the client.

renatomariscal avatar Jun 25 '19 20:06 renatomariscal

I was a bit surprised to find out there is no way to flush the client without closing it. :pray: Please add support for it so that I don't get these dropped messages:

250 messages dropped because they failed to be sent and the client was closed

ruudk avatar Oct 18 '21 12:10 ruudk

+1 to flush functionality! In my opinion the close() + recreate patten is clunky and inefficient. There's an alternative solution to set batchSize = 1 so that the client will send each message to Segment as soon as it's enqueued. Curious to know if there are other workarounds or suggestions from the Segment team.

zackrossman avatar Dec 17 '22 00:12 zackrossman