- Jim Weirich: The Building Blocks of Modularity – http://goo.gl/g4Nk
- Jim Weirich: SOLID Ruby – http://goo.gl/z3jd
- Sandi Metz: SOLID Object-Oriented Design – http://goo.gl/PDn6T
- Sandi Metz: Less – The Path to Better Design – http://goo.gl/VuTl4
- Demeter is for Encapsulation – http://is.gd/eeyLx
- Opinionated Modular Code – http://is.gd/eeyXm
- Scaling to Hundreds of Millions of Requests – http://vimeo.com/12814529
- Confident Code – http://goo.gl/VFLX
- Destroy All Software Screencasts – https://www.destroyallsoftware.com/screencasts
- Corey Haines: Fast Rails Tests – http://goo.gl/Va2gb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ListenerSample { | |
// Adjust the header name if required, on @Header parameter | |
@RabbitListener(queues = "q.finance.invoice") | |
public void listenInvoiceCreated(@Payload String message, @Header(AmqpHeaders.DELIVERY_TAG) long tag, | |
@Header("type") String type) throws IOException { | |
if (StringUtils.equalsIgnoreCase(type, "invoice.paid")) { | |
log.info("Delegate to invoice paid handler"); | |
} else if (StringUtils.equalsIgnoreCase(type, "invoice.created")) { | |
log.info("Delegate to invoice created handler"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; | |
import org.springframework.amqp.core.Message; | |
import org.springframework.amqp.rabbit.annotation.RabbitHandler; | |
import org.springframework.amqp.rabbit.annotation.RabbitListener; | |
import org.springframework.stereotype.Service; | |
import com.course.finance.message.invoice.InvoiceCreatedMessage; | |
import com.course.finance.message.invoice.InvoicePaidMessage; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.springframework.amqp.core.Message; | |
import org.springframework.amqp.core.MessagePostProcessor; | |
import org.springframework.amqp.rabbit.config.SimpleRabbitListenerContainerFactory; | |
import org.springframework.amqp.rabbit.connection.ConnectionFactory; | |
import org.springframework.amqp.rabbit.core.RabbitTemplate; | |
import org.springframework.amqp.support.converter.Jackson2JsonMessageConverter; | |
import org.springframework.boot.autoconfigure.amqp.SimpleRabbitListenerContainerFactoryConfigurer; | |
import org.springframework.context.annotation.Bean; | |
import org.springframework.context.annotation.Configuration; |