What happens if I restart the apm when I still have messages in the queue? Is the messages still there?

I think messages is there。

Whe APM Server is stopped, it will first try to send all queued events to Elasticsearch. By default it will block for up to 5 seconds. This can be increased by modifying apm-server.shutdown_timeout: https://www.elastic.co/guide/en/apm/server/current/configuration-process.html#shutdown_timeout

Thank you for your reply。
If the message is not consumed within five seconds,The rest of the meassages is lost?
Then restart the apm server and the queue is new and empty。

That is correct.

If you would like to make sure the events are not lost, then there is another option: you can configure APM Server to queue events on disk. When APM Server is restarted, the events written to disk will not be lost.

This is not documented for APM Server yet as we have not tested it, but you can try it out by following the documentation for Filebeat (the same config is supported in apm-server.yml):

I understand. Thank you!

1 Like

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.