String ownerName = CarbonContext.getCurrentContext().getUsername();
//we add the queue only if it does not exits. if the topic exists then
//we don't do any thing.
if (!userRegistry.resourceExists(resourcePath)) {
Collection collection = userRegistry.newCollection();
collection.setProperty(MessageBoxConstants.MB_QUEUE_PROPERTY_CREATED_TIME,
ConverterUtil.convertToString(Calendar.getInstance()));
collection.setProperty(MessageBoxConstants.MB_QUEUE_PROPERTY_UPDATED_TIME,
ConverterUtil.convertToString(Calendar.getInstance()));
collection.setProperty(MessageBoxConstants.MB_QUEUE_PROPERTY_CREATED_FROM,