# [ROS2] Calling a service repeatedly from a subscriber callback

I'm having trouble implementing an async service call in my subscriber callback. I found a previous post about doing so here:

However, the example in the answer here only prints the data being received by the subscriber and nothing else before performing the service call, then looks for the response elsewhere. What I'm trying to accomplish in my callback is, in short, the following:

def subscriber_callback(self):
for element in msg.list_of_vals:
self.publish(element)
while True:
self.async_service_call()
while True:
rclpy.spin_once(node)

I still call rclpy.spin(node) in my main() function and when I run this, it hangs on rclpy.spin_once. I realize this is probably because rclpy is already spinning from the main() function, but how else would I get the node started? I tried creating an internal spin() function like in the posted link, but it hangs again on rclpy.spin_once.