Skip to main content
Version: v2

Publishing a message with retry settings

caution

NOTE: This may not work right now, it is a known bug.

See Sample Topic with Retry Settings for defining a default retry policy

client.example.ts
import SimpleTopic from 'pubsub/topics/simple.topic.name';
let topic = new SimpleTopic();
topic.publish(
{ id: 1, data: 'My first message' },
{
retryConfig: {
retryCodes: [10, 1],
backoffSettings: {
initialRetryDelayMillis: 100,
},
}
},
);