@Override
	public synchronized void receive(AisMessage aisMessage) {
		// Make new queueEntry
		QueueEntry queueEntry = new QueueEntry(aisMessage, new Date());
		
		// Try to add to queue
		try {
			queue.add(queueEntry);
			queuedMessages++;
		} catch (IllegalStateException e) {
			overflowMessages++;
			Date now = new Date();			
			if (now.getTime() - lastInsertErrorReported.getTime() > 60000) {
				lastInsertErrorReported = now;
				LOG.error("Failed to insert message to queue: Queue overflow (" + overflowMessages + "/" + queuedMessages + ")");
			}
			
		}

	}