There is no other solution unless using SpEL:
<bean id="machineName" class="java.lang.String">
<constructor-arg value="#{T(java.net.InetAddress).localHost.hostName}"/>
</bean>
<rabbit:queue id="fooQueue"
name="fooQueue.#{ machineName }"
durable="false"
auto-delete="false"
exclusive="false" />
The same as you are doing, but without new class and via SpEL features.