Brian
Brian

Reputation: 338

Azure function with dynamic queue name output

Edit: rewriting question as I learned a lot more

Basically I want a function with a topic subscription trigger, that will then output to a queue, but the queue name is determined by the inbound message header. Pseudocode:

<-- @ServiceBusTopicTrigger(message)
outboundqueueName = getQueueName(message.getProperty('x'))
--> @ServiceBusQueueOutput(outboundQueueName)

So it seems I can create a function with topic trigger and configure an input from a cosmos DB for example and output to a queue.

But this will only work for a specific queue, how can I choose which queue to send to?

(Java coding)

TIA

Upvotes: 0

Views: 775

Answers (1)

Architect Jamie
Architect Jamie

Reputation: 2569

If there isn't much else you need to do with the message except drop something on to dynamically determined queue, why not use a Logic App?


enter image description here


That screenshot's just a concept demo. There's a great example of parsing JSON and selecting properties etc. documented here:

https://blogs.biztalk360.com/azure-logic-apps-event-hubs/

Upvotes: 1

Related Questions