public void PutMessage(string content, int priority, int characterSet, string correlationId, string groupId, int?lsn) { var ep = BuildExtendedProperties(correlationId, groupId, lsn); var msg = QueueSource.NewMessage(content, priority, characterSet, ep); QueueSource.PutMessages(new[] { msg }, CancellationToken.None); }
public void PutMessages(IEnumerable <string> contents, int priority, int characterSet, string correlationId, string groupId, int?lsn, CancellationToken ct, IProgress <int> progress) { var msgs = contents.Select(s => { var ep = BuildExtendedProperties(correlationId, groupId, lsn); if (lsn.HasValue) { lsn++; } return(QueueSource.NewMessage(s, priority, characterSet, ep)); }).ToList(); QueueSource.PutMessages(msgs, ct, progress); }