Tag: java
All the articles with the tag "java".
Learning RabbitMQ and Spring AMQP (Part 4): JSON Message Bodies
Explains how to pass Java objects as JSON in RabbitMQ and Spring AMQP by configuring message converters on the producer and consumer. Examples cover object serialization, Content-Type and timestamp settings, and mapping received messages to Java entities with @Payload.
RabbitMQ and Spring AMQP (Part 3): Message Reliability
Message delivery, storage, and consumption introduce publisher confirms, returned messages, durable components, and message persistence in Spring AMQP. The article demonstrates manual consumer acknowledgments, rejection, and requeuing, and explains why persistence can still leave a risk of message loss.
Learning RabbitMQ and Spring AMQP (Part 2): Messaging Models and the Startup Process
Explains RabbitMQ brokers, connections, and channels, comparing the native Java client with Spring AMQP. It covers producer and consumer configuration responsibilities and pooled channel reuse, then traces listener registration, component declarations, and consumer startup through the source code.
Learning RabbitMQ and Spring AMQP (Part 1)
This article explains how producers, exchanges, routing keys, bindings, and queues relate in RabbitMQ and demonstrates virtual-host configuration and publishing from the management console. Spring AMQP examples connect exchange declarations, queue bindings, consumer listeners, and producer publishing into a basic workflow.
JVM Notes (Part 2)
A collection of common JVM diagnostic tools: use jps to obtain Java process IDs, jinfo to inspect or adjust runtime options, and jmap to view heap information. The article also introduces graphical tools such as jvisualvm and jconsole and explains how to connect to a local or remote JVM to inspect its options.
JVM Notes (Part 1)
Notes on Java bytecode, stack frames, and JVM runtime data areas, together with common startup options for heap memory, thread stacks, garbage collection, and heap dumps. Parameter conversions and capacity examples illustrate memory configuration, followed by the difference between memory leaks and running out of memory.
Arthas
This article records Arthas startup, reconnection, and common startup issues, with practical examples of finding classes, decompiling, compiling, and hot updates. It also covers changing log levels dynamically, inspecting and modifying JVM options, and cautions when using redefine.
Locks in Java (Part 3): Implementing Wait and Notify with Condition
Explains how to combine Lock and Condition to make threads wait and notify one another, comparing await, signal, and signalAll with wait/notify. A ReentrantLock example illustrates thread coordination and the requirement to acquire the lock before waiting or notifying and release it afterward.