You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I need to return a message with application properties from ServiceBusOutput so can't just use a string return. If I return a ServiceBusMessage the Body contains the entire message and the original Body is lost.
Is there any way to return anything other than a string, byte[] or JSON from ServiceBusOutput as IAsyncCollector<ServiceBusMessage> is not available in isolated worker process.
[Function("TestTrigger")]
[ServiceBusOutput("%OutputQueueName%", Connection = "ServiceBusConnection", EntityType = ServiceBusEntityType.Queue)]
public IEnumerable Run(
[ServiceBusTrigger(queueName: "%InputQueueName%", Connection = "ServiceBusConnection")] ServiceBusReceivedMessage message
{
var outputMessage = new ServiceBusMessage
{
Body = message.Body,
MessageId = message.MessageId
};
outputMessage.ApplicationProperties["TheRetryCount"] = "111";
IEnumerable<ServiceBusMessage> outputMessages = new ServiceBusMessage[] { outputMessage };
return outputMessages;
}
In ServiceBusExplorer the message body contains everything but the original body:
The text was updated successfully, but these errors were encountered:
codebrane
changed the title
ServiceBusOutput makes body null if returning ServiceBusMessage
ServiceBusOutput puts entire message in body if returning ServiceBusMessage
Nov 3, 2023
I need to return a message with application properties from
ServiceBusOutput
so can't just use astring
return. If I return aServiceBusMessage
the Body contains the entire message and the original Body is lost.Is there any way to return anything other than a
string
,byte[]
or JSON from ServiceBusOutput asIAsyncCollector<ServiceBusMessage>
is not available in isolated worker process.In ServiceBusExplorer the message body contains everything but the original body:
The text was updated successfully, but these errors were encountered: