Hi,
I am using Rabbitmq and akka. I am currently using akka http, alpakka amqp, and akka streams. I have managed to get akka http and alpakka amqp running separately but I want to combine the two. I am completely stuck. I have akka http obtaining all the name of the queues in my rabbitmq api json and then I want alpakka amqp to connect to the queue names obtained. What I am confused about is I have akka http as a Source and the AmqpSource is also a Source. So how to get the obtained string value from the akka http source and then pass it to the parameter of AmqpSource and then make it run. I know I am just mapping but how to make AmqpSource run in the graph. I tried .run() and .runWith() which is probably totally incorrect.
1.
First, I just want to know how to go about connecting to one queue from the data of akka http.
I tried
def connect (queue: String) = {
AmqpSource.atMostOnceSource(NamedQueueSourceSettings(amqpUri, queue),10)
}
val httptoamqp = obtainallqueuenames .map( _.apply(1).toString()).map( _=> connect(_))
I also did
obtainallqueuenames.map( _.map( NamedQueueSourceSettings(amqpUri, ))).map(.map(AmqpSource.atMostOnceSource(_ , bufferSize = 10))).map(_.apply(1))
httptoamqp ~> sink
I just want to make a connection to rabbitmq. I'm not sure how to go about doing this.
**2.**
I would like to know how to connect to multiple queues?
Thank you,
Ken