Apache ActiveMQ fall back mechanism

I am using Apache Active MQ with Spring..... the problem I am facing is that I am creating producer on one machine let say Machine1 and I am creating one consumer on second machine let say Machine2... I am creating producer on Machine1 by calling a simple servlet call.... and then create a consumer on Machine2.... Problem I am facing is that suppose in anyway if my producer is not able to send any data packet in specified time duration then I want to delete my consumer and Queue from Machine2... Is there anyway I can set my Consumer and Queue to get auto delete and perform some business logic if I do not get any packet from producer in a specified time duration....

connectionFactory = new ActiveMQConnectionFactory(ActiveMQConnection.DEFAULT_USER,ActiveMQConnection.DEFAULT_PASSWORD,ConnectorURL);
connection = connectionFactory.createConnection();
session = connection.createSession(transacted, Session.AUTO_ACKNOWLEDGE);
destination = session.createQueue(queueID+"");
connection = connectionFactory.createConnection();
consumer = session.createConsumer(destination);

basically this code create consumer for my application....then I assign this consumer to my application listener that listen if producer send any message to consumer....

ScenarioExecutionQueueListenerImpl executionQueueListener = new ScenarioExecutionQueueListenerImpl(scenario,result, host);
Message message = consumer.receive();

I am trying to pass dimensions to a Java Swing JPanel creator class. No luck so far. I even put the contentPane.setPreferredSize(new Dimension(intWidth, intHeight)); in a try / catch block and I did ...

To illustrate my point: I have Name Age and Address of 4 people [Sam, 23, nj], [Nome, 25, ny], [Sim, 20, pa], [Jack, 12, pa] I need to send these 4 rows to the java side. I am familiar with java ...

I'm involved in a project where we generate pdf-files using iText. I want to generate superscipt text and I know that methods exists for converting chunks of text to superscript however, I am in a ...

I am using Spring boot. I want to check which logging implementation is printing the message - I know with Spring boot default is Logback, and I have excluded it as mentioned in this post so mostly ...