Skip to main content
Version: v1

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, { Payload } from 'pubsub/topics/simple.topic.name';
let topic = new SimpleTopic();
topic.publish<Payload>(
{ id: 1, data: 'My first message' },
{
retryCodes: [10, 1],
backoffSettings: {
initialRetryDelayMillis: 100,
},
},
);