Skip to content

Instantly share code, notes, and snippets.

@gdyrrahitis
Created May 23, 2020 10:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gdyrrahitis/b85f1b8d0cd66491e9b80f756203d160 to your computer and use it in GitHub Desktop.
Save gdyrrahitis/b85f1b8d0cd66491e9b80f756203d160 to your computer and use it in GitHub Desktop.
var properties = Channel.CreateBasicProperties();
properties.AppId = AppId;
properties.ContentType = "application/json";
properties.DeliveryMode = 1; // Doesn't persist to disk
properties.Timestamp = new AmqpTimestamp(DateTimeOffset.UtcNow.ToUnixTimeMilliseconds());
Channel.BasicPublish(exchange: ExchangeName, routingKey: RoutingKeyName, body: body, basicProperties: properties);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment