When to use kafka connector(inbound, outbound) and when to use task(message receive and message send)

when to use kafka connector(inbound, outbound) and when to use task(message receive and message send)