## Genie with C Hats Puzzle (Interview Puzzle)

###### 2 years ago Lalit Bhagtani 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

## 25 Horses 5 Tracks Puzzle (Interview Puzzle)

###### 2 years ago Lalit Bhagtani 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

## Removing Timezone from XMLGregorianCalendar

###### 2 years ago Lalit Bhagtani 0
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

## RabbitMQ Exchange Types, Bindings and Routing Keys

###### 2 years ago Lalit Bhagtani 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

###### 2 years ago Lalit Bhagtani 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

## RabbitMQ – Topic Exchange

###### 2 years ago Lalit Bhagtani 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

## RabbitMQ – Direct Exchange

###### 2 years ago Lalit Bhagtani 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

## RabbitMQ – Fanout Exchange

###### 2 years ago Lalit Bhagtani 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

## Gold Bar Puzzle (Interview Puzzle)

###### 2 years ago Lalit Bhagtani 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

## 10 Coins Puzzle (Interview Puzzle)

###### 2 years ago Lalit Bhagtani 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.