Add amqp10 module: AMQP 1.0 in Spring Boot 4.2 with RabbitMQ 4
Generic spring-boot-starter-amqp (AmqpClient, @AmqpListener) and RabbitMQ's own AMQP 1.0 client against a real RabbitMQ 4.4.1 broker via Testcontainers. Transcripts in amqp10/output/ are written by the tests; no docs/ folder. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017ic4b44H98Yd627wauSpzA
This commit is contained in:
co-authored by
Claude Sonnet 5.5
parent
78fc41e586
commit
e54cf840fd
Executable
+54
@@ -0,0 +1,54 @@
|
||||
#!/usr/bin/env bash
|
||||
# Prints what the two Boot 4.2.0 starters really contain, read straight from their jars
|
||||
# (spring-configuration-metadata.json and the auto-configuration imports). Run after one mvn build
|
||||
# so the jars are in ~/.m2.
|
||||
set -eu
|
||||
cd "$(dirname "$0")/.."
|
||||
OUT=output/10-starter-comparison.txt
|
||||
M2="${HOME}/.m2/repository"
|
||||
BOOT=$(ls "$M2/org/springframework/boot/spring-boot-amqp" | sort -V | tail -1)
|
||||
fetch() { # fetch <group-path> <artifact> <version> -> jar path (downloads via maven if missing)
|
||||
local jar="$M2/$1/$2/$3/$2-$3.jar"
|
||||
[ -f "$jar" ] || mvn -B -q dependency:get -Dartifact="$(echo "$1" | tr / .):$2:$3" >/dev/null
|
||||
echo "$jar"
|
||||
}
|
||||
props() { # props <jar> <prefix-filter>
|
||||
unzip -p "$1" META-INF/spring-configuration-metadata.json | python3 -c "
|
||||
import json,sys
|
||||
d=json.load(sys.stdin)
|
||||
for p in d['properties']:
|
||||
if p['name'].startswith('$2'):
|
||||
print(' %-48s default=%s' % (p['name'], p.get('defaultValue')))"
|
||||
}
|
||||
{
|
||||
echo "Spring Boot $BOOT"
|
||||
for s in amqp amqp-rabbitmq rabbitmq; do
|
||||
echo
|
||||
echo "== spring-boot-starter-$s: description and dependencies"
|
||||
pom="$M2/org/springframework/boot/spring-boot-starter-$s/$BOOT/spring-boot-starter-$s-$BOOT.pom"
|
||||
[ -f "$pom" ] || mvn -B -q dependency:get -Dartifact="org.springframework.boot:spring-boot-starter-$s:$BOOT:pom" >/dev/null
|
||||
grep -E '<description>|<artifactId>spring-boot-(amqp|amqp-rabbitmq|rabbitmq)<' "$pom" | sed 's/^ *//'
|
||||
done
|
||||
echo
|
||||
echo "== spring-boot-amqp auto-configuration classes"
|
||||
unzip -p "$(fetch org/springframework/boot spring-boot-amqp "$BOOT")" META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports | sed 's/^/ /'; echo
|
||||
echo "== spring-boot-amqp properties (spring.amqp.*)"
|
||||
props "$(fetch org/springframework/boot spring-boot-amqp "$BOOT")" spring.amqp.
|
||||
echo
|
||||
echo "== spring-boot-amqp-rabbitmq auto-configuration classes"
|
||||
unzip -p "$(fetch org/springframework/boot spring-boot-amqp-rabbitmq "$BOOT")" META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports | sed 's/^/ /'; echo
|
||||
echo "== spring-boot-amqp-rabbitmq properties (spring.amqp.rabbitmq.*)"
|
||||
props "$(fetch org/springframework/boot spring-boot-amqp-rabbitmq "$BOOT")" spring.amqp.rabbitmq. | grep -E 'rabbitmq\.(host|port|username|password|address) '
|
||||
echo
|
||||
echo "== spring-boot-rabbitmq auto-configuration classes"
|
||||
unzip -p "$(fetch org/springframework/boot spring-boot-rabbitmq "$BOOT")" META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports | sed 's/^/ /'; echo
|
||||
echo "== spring-boot-rabbitmq properties (selected spring.rabbitmq.*)"
|
||||
props "$(fetch org/springframework/boot spring-boot-rabbitmq "$BOOT")" spring.rabbitmq. | grep -E 'rabbitmq\.(host|port|username|password|virtual-host) '
|
||||
echo
|
||||
echo "== which Boot module wires RabbitMQ's AMQP 1.0 client (RabbitAmqpTemplate)?"
|
||||
for j in spring-boot-amqp spring-boot-amqp-rabbitmq spring-boot-rabbitmq; do
|
||||
n=$(unzip -p "$(fetch org/springframework/boot $j "$BOOT")" 'org/springframework/boot/*/autoconfigure/*AutoConfiguration*.class' 2>/dev/null | strings | grep -c 'RabbitAmqpTemplate' || true)
|
||||
echo " $j: auto-configuration classes mentioning RabbitAmqpTemplate: $([ "$n" -gt 0 ] && echo yes || echo no)"
|
||||
done
|
||||
} > "$OUT"
|
||||
cat "$OUT"
|
||||
Reference in New Issue
Block a user