Genie with C Hats Puzzle (Interview Puzzle)

7 months ago codedestine 0
Genie with C Hats Puzzle :- There are N number of men and one genie on a deserted island, A genie gathers all the men and put the hat on C number of men’s head, such that one man has only one hat on his head. The hat has some magical powers, hat cannot be seen by Read More

25 Horses 5 Tracks Puzzle (Interview Puzzle)

7 months ago codedestine 0
25 Horses 5 Tracks Puzzle :- You have given one horse race track and 25 horses. In one race, only(maximum) 5 horses can run together. What is the minimum number of races that are required to find 3 fastest horses? Now try to solve this on your own… Solution of 25 Horses 5 Tracks Puzzle Read More

Removing Timezone from XMLGregorianCalendar

7 months ago codedestine 1
If you had worked on a project which consume or publish web services, then you would have faced a problem with date (XMLGregorianCalendar) object, where you would like to send only date string as yyyy-MM-dd but complete yyyy-MM-dd’T’HH:mm:ss’Z’ has been sent. This date string contains date, time and timezone information, if you like to send Read More

RabbitMQ Exchange Types, Bindings and Routing Keys

9 months ago codedestine 0
Exchanges are message routing agents, which are defined per virtual host within the rabbitMQ system. When program/application (Known as Producer) connect to RabbitMQ server to publish a message, it first sends the message to an exchange. After receiving a message, exchange routes them to different message queues with help of header attributes, bindings, and routing keys. It should be noted that messages Read More

RabbitMQ – Headers Exchange

9 months ago codedestine 0
Headers Exchange :- A headers exchange is an exchange which route messages to queues based on message header values instead of routing key. Producer adds some values in a form of key-value pair in message header and sends it to headers exchange. After receiving a message, exchange try to match all or any (based on the value of Read More

RabbitMQ – Topic Exchange

9 months ago codedestine 0
Topic Exchange :- A topic exchange is an exchange which route messages to queues based on the wildcard match between routing key and routing pattern specified during the binding of the queue. Producer adds routing key in message header and sends it to topic exchange. After receiving a message, exchange try to match the routing key with the binding routing pattern of Read More

RabbitMQ – Direct Exchange

9 months ago codedestine 0
Direct Exchange :- A direct exchange is an exchange which route messages to queues based on message routing key. The routing key is a message attribute in the message header added by the producer.Producer adds routing key in message header and sends it to direct exchange. After receiving a message, exchange try to match the routing key with the binding Read More

RabbitMQ – Fanout Exchange

9 months ago codedestine 0
Fanout Exchange :- A fanout exchange is an exchange which routes the received message to all the queues bound to it. When the producer sends the message to fanout exchange, it copies the message and routes to all the queues that are bound to it. It just ignores the routing key or any pattern matching provided Read More

Gold Bar Puzzle (Interview Puzzle)

10 months ago codedestine 0
Gold Bar Puzzle :- You have hired a person for seven days to work on your house and you have agreed to pay him a gold bar as a compensation. The gold bar is divided into seven pieces and is connected with each other like a chain. You have to give him a piece of Read More

10 Coins Puzzle (Interview Puzzle)

10 months ago codedestine 0
10 Coins Puzzle :- There are 10 coins placed on the table, 5 coins head up and 5 coins tails up. You are blindfolded and are allowed to touch the coins but you can’t tell which one heads up or tails up just by feeling and you can flip the coins any number of times. Read More