Category: Integration

Adding a partition in Kafka

The impact is pretty clear. Below we load ten events using a given key. We add a partition, then load ten more events. Notice the partition differs after adding a partition, even though the key is the same.

Python KafkaProducer and lost events

While testing the python kafka package and its associated KafkaProducer class, I found that events were “lost”; i.e., they were never successfully persisted in the destination topic. Various blogs suggest setting a sleep(2) call, or whatever, which seemed odd. I…

Listing all queues in ActiveMQ

This still has an issue with getting a consistent read. I will update this once I figure that piece out… import org.apache.activemq.*; import java.util.*; import org.apache.activemq.advisory.DestinationSource; import javax.jms.*; import javax.naming.*; import org.apache.activemq.*; import org.apache.activemq.command.ActiveMQQueue; public class ListQueues { public static…

Broken out into two routes…   Consume web service and enqueuer in ActiveMQ Dequeue from ActiveMQ and persist in PO object in Oracle database     <route id=”get-po”> <from uri=”timer://simpleTimer?period=30s”/> <to uri=”http://cmhlcarchapp01:8080/tradestone/send_po.jsp“/> <to uri=”jms:queue:testMQ” /> </route>   <route id=”insert-db”> <from…

Listing queues and topics in ActiveMQ

This will provide the list of queues and topics managed by an ActiveMQ broker… import javax.jms.*; import java.io.*; import java.util.*; import org.apache.activemq.*; import org.apache.activemq.command.*; import org.apache.activemq.advisory.*; public class GetDestinations { private static String url = ActiveMQConnection.DEFAULT_BROKER_URL; public static void main(String[]…

Where is my bundle in Karaf?

You can find the bundle by: * performing an osgi:list in the karaf shell * Take the bundle ID * navigate to the FUSE_BASE_DIR/data/cache/bundle${ID_ABOVE}/version* * jar -tvf bundle.jar This will show you the contents of the bundle, with which you…

Testing ActiveMQ with JMeter

Create a normal JMeter test with a ThreadGroup. Add a JMS Point to Point component, as shown below… Add the following configurations, which I couldn’t show in a single window (not enough space). In Apache 2.11, ActiveMQ libraries must already…