queue issue

I am facing one issue with the LinkedBlockingQueue, I wrote two threads one producer and one consumer. These threads are running in the background. At a particular time the producer thread retrieves the data from the Database and sets the pojo objects. these objects put into queue.

Now, consumer thread retrieving the objects from queue, how ever its not happening, some times consumer retrieve one object from queue.

As of my understanding the consumer should retrieve the object from queue as soon as its put by the producer,