@Override
public CallbackCompletion<Void> initialize (final ConsumerByteKVContext context, final CloudletCallbackArguments<ConsumerByteKVContext> arguments)
{
this.logger.info ("ConsumerByteKV initializing...");
context.cloudlet = arguments.getCloudlet ();
final IConfiguration configuration = context.cloudlet.getConfiguration ();
final IConfiguration queueConfiguration = configuration.spliceConfiguration (ConfigurationIdentifier.resolveAbsolute ("queuemhttpgw.consumer"));
final IConfiguration queueConfiguration2 = configuration.spliceConfiguration (ConfigurationIdentifier.resolveAbsolute ("queueclient.publisher"));
final IConfiguration kvConfiguration = configuration.spliceConfiguration (ConfigurationIdentifier.resolveAbsolute ("storebyte"));
context.publisher = context.cloudlet.getConnectorFactory (IAmqpQueuePublisherConnectorFactory.class).create (queueConfiguration2, String.class, PlainTextDataEncoder.DEFAULT_INSTANCE, new AmqpPublisherCallback (), context);
context.consumer = context.cloudlet.getConnectorFactory (IAmqpQueueConsumerConnectorFactory.class).create (queueConfiguration, byte[].class, NullDataEncoder.create(), new AmqpConsumerCallback (), context);
context.kvStore = context.cloudlet.getConnectorFactory (IKvStoreConnectorFactory.class).create (kvConfiguration, String.class, PlainTextDataEncoder.DEFAULT_INSTANCE, new KeyValueCallback (), context);
return CallbackCompletion.createAndChained (context.consumer.initialize (),context.publisher.initialize (),context.kvStore.initialize());
}