Make enqueueMessage more DRY

The same code already exists in the getMessageQueue() function so we should use that