--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-user...@googlegroups.com.
To post to this group, send email to rabbitm...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/rabbitmq-users/8ea75287-140f-49f6-b557-69121f993d9d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitm...@googlegroups.com.
@SpringBootApplication
public class RabitUsers1Application {
public static void main(String[] args) {
SpringApplication.run(RabitUsers1Application.class, args);
}
@Bean
public ApplicationRunner runner(RabbitTemplate template) {
template.setChannelTransacted(true);
template.setMandatory(true);
template.setReturnCallback((message, replyCode, replyText, exchange, routingKey) -> {
System.out.println("Message returned:" + replyText + ":" + message);
});
return args -> {
while (true) {
template.convertAndSend("txtest", "txtest", "foo");
System.in.read();
}
};
}
}
Message returned:NO_ROUTE:(Body:'foo' MessageProperties [headers={}, contentType=text/plain, contentEncoding=UTF-8, contentLength=0, receivedDeliveryMode=PERSISTENT, priority=0, deliveryTag=0])
There are no server requirements for transactions; for Java you call channel.txSelect() and then txCommit() or txRollback() (spring takes care of all this when you set channelTransacted. I would guess something similar with other language bindings.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-user...@googlegroups.com.
To post to this group, send email to rabbitm...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/rabbitmq-users/6f4b6a72-b44e-42f9-82b4-946d01684ba2%40googlegroups.com.