class AmqpItemWriter<T> implements ItemWriter<T> {

	private final AmqpTemplate amqpTemplate;

	private final Log log = LogFactory.getLog(getClass());

	public AmqpItemWriter(final AmqpTemplate amqpTemplate) {
		Assert.notNull(amqpTemplate, "AmqpTemplate must not be null");

		this.amqpTemplate = amqpTemplate;
	}

	@Override
	public void write(final Chunk<? extends T> items) throws Exception {<FILL_FUNCTION_BODY>}

}

		if (log.isDebugEnabled()) {
			log.debug("Writing to AMQP with " + items.size() + " items.");
		}

		for (T item : items) {
			amqpTemplate.convertAndSend(item);
		}
	
<no_super_class>