headers.put(AmqpHeaders.TYPE, type); String userId = amqpMessageProperties.getReceivedUserId(); if (StringUtils.hasText(userId)) { headers.put(AmqpHeaders.RECEIVED_USER_ID, userId);
headers.put(AmqpHeaders.TYPE, type); String userId = amqpMessageProperties.getReceivedUserId(); if (StringUtils.hasText(userId)) { headers.put(AmqpHeaders.RECEIVED_USER_ID, userId);
headers.put(AmqpHeaders.TYPE, type); String userId = amqpMessageProperties.getReceivedUserId(); if (StringUtils.hasText(userId)) { headers.put(AmqpHeaders.RECEIVED_USER_ID, userId);
@Test public void testReceiveBlocking() throws Exception { this.template.setUserIdExpressionString("@cf.username"); this.template.convertAndSend(ROUTE, "block"); Message received = this.template.receive(ROUTE, 10000); assertNotNull(received); assertEquals("block", new String(received.getBody())); assertThat(received.getMessageProperties().getReceivedUserId(), equalTo("guest")); this.template.setReceiveTimeout(0); assertNull(this.template.receive(ROUTE)); }