Spring Cloud Stream RabbitMQ - Partitioning using header instead of routing key - rabbitmq

I was going through the documentation but couldn't find anything related to this, so I'm here just to confirm with you.
We'd like to partition Rabbit queues using Spring Cloud Stream, but would like to do so without using routing keys for it. Is there a way to do it by using headers or properties in the messages?
RabbitMQ plugins allow this but, does spring cloud stream allow it in some way?
Thanks and regards.

You can manually provision whatever exchange type you want and set the declareExchange property to false.

Related

Spring Reactive Proxy server for file operation on S3

I'm building a proxy server that streams large files from clients (iOS, web etc) to S3. I'm planning to use Spring reactive with Netty. I'm catching up with Netty and reactive architecture and so far it looks very promising. Does anyone of you has solved something like this before? If yes, can you please share some pointers or a GitHub URL for a starter project that will be great.
Few questions:
Is this possible to do with my current tech stack? I think it is. But wanted to get feedback.
With Netty and reactive architecture, chunks of data will be coming in an async fashion, how do I make sure I send the packet in sequence to S3?
Also, does AmazonS3 client supports reactive file operations using their Java SDK? If not then probably I will need to directly call their API using Spring reactive WebClient.
I understand this question is not to the point and very broad. The intent here is to find if anyone has solved something like this and if they can provide some tips.
Thanks.
With upcoming AWS SDK 2.0, you should be able to use reactive file operation with S3 as it would call subscribe on the publishing stream you pass to it.

Apache Flume Kafka Producer - Generate partition_id/key dynamically

I have a task to use Apache Flume to send messages to a Kafka topic. The caveat is that I have to specify a partition based on an IP address that will be in the message.
Is there a way to configure Apache Flume to do this dynamically, or do I have to implement a custom Producer plugin?
Thank you.
After some research, the only real custom way of configuring the producer is to roll your own.
I implemented the AbstractSink interface and put in my own hash algorithm to generate a partition to send the message to.

Is the NServiceBus RabbitMQ storage automatically the subscription storage?

Since RabbitMQ saves the subscriptions in the exchange routing, do you actually need to configure StorageType.Subscriptions' persistence?
Only if you want to use a different type of persistence...

move hornetq message from a queue to another without reading it out

We have a use case where we would like to get a certain messages in a queue distributed into other queues after we browse the queue and get the message properties. Can that be done with JMS API for hornetq or should we use a JMX client as that seems to be a possible operation in jvisualvm?
I don't know if I understand You correctly but if You would like to copy from one queue to another only filtered messages You can use bridge.
http://docs.jboss.org/hornetq/2.3.0.CR2/docs/user-manual/html/core-bridges.html
In bridge configuration You can define which messages should be copied from one queue to another
It seems that org.hornetq.api.jms.management.JMSQueueControl from the HornetQ Management API will do the trick. I was hoping for some generic JMS API that would allow that as well but this will work.

What is the best alternative way of monitoring apache Active MQ other than using JMX API

I have tried and tested the JMX API and it is pretty simple to use and provides a vast number of statistics required for monitoring ActiveMQ.
But the problem is, i dont want to monitor my ActiveMQ remotely and also i dont want to use another API.To be more precise, i want to use the JMS API itself to get statistics related to various destinations and the broker itself.
Advisory messages seem to be an alternative but they provide limited Amount of Administrative Messages to monitor.
Any input is highly appreciated...
There is no built-in support for this. But you can implement a JMS topic which publishes the monitoring data every few seconds. Make the connection non-persistent so that it doesn't pile up when there are no listeners or when they loose connection.
Now you can write a client that connects to this topic and it will receive updates.
AMQ-2379 resulted in a broker plugin for grabbing statistics from destinations by sending a simple JMS message. Check out the docs that show how to use it here:
http://activemq.apache.org/statisticsplugin.html
The statistics plugin is available in the 5.3 release.
You can checkout this http://issues.apache.org/activemq/browse/AMQ-2379, it will be avaiable in upcoming 5.3.0 release
There's a blog post queued up to go on http://issues.apache.org/activemq/browse/AMQ-2379 - will post it in a couple of days or so