A man was arrested Thursday morning in connection with a shooting that wounded two people at a coffee shop in Encinitas, authorities said.